java - Why does gmail close my connection when I send email through Javamail -
I have a process (Message Inspired Bean) that sends emails every time, sends a message per email to 10 Are less. I open 1 connection to my Gmail account and send all emails to the same connection. Every now and then, I get an exception at Transport.send ()
javax.mail.MessagingException: can not send commands to the SMTP host; The nested exception is: java.net.SocketException: connection to com.sun.mail.smtp.SMTPTransport.sendCommand (SMTPTransport.java:1878) com.sun.mail.smtp.SMTPTransport.sendCommand (SMTPTransport.java off by remote host Done: 1865) com.sun.mail.smtp.SMTPTransport.close (SMTPTransport.java:973) at javax.mail.Transport.send0 (Transport.java:193) at javax.mail.Transport.send (Transport.java On: 120) but ....
Is the Gmail connection going down because it thinks this is spam? I know that there is a limit on the number of concurrent connections for Gmail (10) but it seems different should any connection pool support be used?
The GMM exits on your TCP / IP connection and decides to close it, Or in the middle the firewall detects the connection to be inactive and closes it.
Comments
Post a Comment