Closed pditommaso closed 3 years ago
How have you configured the pool?
On Tue, May 28, 2019 at 10:20 PM Paolo Di Tommaso notifications@github.com wrote:
When using the mail connection I can only manage to send two email messages. After the second I'm getting the following exceptions.
backend_1 | com.sun.mail.smtp.SMTPSendFailedException: 451 Timeout waiting for data from client. backend_1 | backend_1 | at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2358) backend_1 | at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1823) backend_1 | at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1300) backend_1 | at org.nlab.smtp.transport.connection.DefaultClosableSmtpConnection.doSend(DefaultClosableSmtpConnection.java:105) backend_1 | at org.nlab.smtp.transport.connection.DefaultClosableSmtpConnection.sendMessage(DefaultClosableSmtpConnection.java:38) ... omitted
Trying again:
backend_1 | javax.mail.MessagingException: Can't send command to SMTP host backend_1 | at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:2415) backend_1 | at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:2402) backend_1 | at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2332) backend_1 | at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1823) backend_1 | at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1300) backend_1 | at org.nlab.smtp.transport.connection.DefaultClosableSmtpConnection.doSend(DefaultClosableSmtpConnection.java:105) backend_1 | at org.nlab.smtp.transport.connection.DefaultClosableSmtpConnection.sendMessage(DefaultClosableSmtpConnection.java:38) ... omitted
Then, trying to send another mail
backend_1 | java.lang.IllegalStateException: Not connected backend_1 | at com.sun.mail.smtp.SMTPTransport.checkConnected(SMTPTransport.java:2510) backend_1 | at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1257) backend_1 | at org.nlab.smtp.transport.connection.DefaultClosableSmtpConnection.doSend(DefaultClosableSmtpConnection.java:105) backend_1 | at org.nlab.smtp.transport.connection.DefaultClosableSmtpConnection.sendMessage(DefaultClosableSmtpConnection.java:38) backend_1 | at io.seqera.watchtower.service.MailServiceImpl.sendMail(MailServiceImpl.groovy:157) backend_1 | at io.seqera.watchtower.service.UserServiceImpl.sendAccessEmail(UserServiceImpl.groovy:67) ... omitted
then the above error persists. Am I missing something obvious?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nithril/smtp-connection-pool/issues/20?email_source=notifications&email_token=AAEOOU3CFK547RWMRMOXOKDPXWHXJA5CNFSM4HQGYGN2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWKGFDA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEOOU4GCR2AHYHIVF5KFBLPXWHXJANCNFSM4HQGYGNQ .
-- LilActu.fr Agrégateur de News http://lilactu.fr
I'm creating passing my own session:
def factory = new SmtpConnectionFactory(session, this, this)
pool = new SmtpConnectionPool(factory)
and this
implements the following methods:
@Override
final void connect(Transport transport) throws MessagingException {
transport.connect(host, port as int, user, password)
}
@Override
final Transport getTransport(Session session) throws NoSuchProviderException {
return session.getTransport()
}
When using the mail connection I can only manage to send two email messages. After the second I'm getting the following exceptions.
Trying again:
Then, trying to send another mail
then the above error persists. Am I missing something obvious?