Hi,
we are seeing issues when sending emails using SmtpClient class. 99% of emails are sent without issues, but sometimes, an email will not be sent and we don’t get an error in this case (SmtpClient::send does not throw an exception). At the moment, it seems, this only happens on Linux systems.
I enabled logging to get more information. A successful send looks like this:
Smtp client[1|29.10.2024 12:59:35]:
Smtp client[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp client[1|29.10.2024 12:59:35]: Bind Address: IPv4: /83.169.7.135 :53152
29.10.2024 12:59:35
Smtp client[1|29.10.2024 12:59:35]: Remote Address: IPv4: wp1013335.mailout.server-he.de/5.175.14.203 :465
29.10.2024 12:59:35
Smtp server[1|29.10.2024 12:59:35]: 220 wp681.webpack.hosteurope.de ESMTP Host Europe Mail Service Tue, 29 Oct 2024 12:59:35 +0100
Smtp server[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp client[1|29.10.2024 12:59:35]: EHLO lvps83-169-7-135.dedicated.hosteurope.de
Smtp client[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp server[1|29.10.2024 12:59:35]: 250-wp681.webpack.hosteurope.de Hello lvps83-169-7-135.dedicated.hosteurope.de [83.169.7.135]
Smtp server[1|29.10.2024 12:59:35]: 250-SIZE 52428800
Smtp server[1|29.10.2024 12:59:35]: 250-8BITMIME
Smtp server[1|29.10.2024 12:59:35]: 250-PIPELINING
Smtp server[1|29.10.2024 12:59:35]: 250-AUTH PLAIN LOGIN
Smtp server[1|29.10.2024 12:59:35]: 250 HELP
Smtp server[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp client[1|29.10.2024 12:59:35]: AUTH PLAIN xxx=
Smtp client[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp server[1|29.10.2024 12:59:35]: 235 Authentication succeeded
Smtp server[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp client[1|29.10.2024 12:59:35]: NOOP
Smtp client[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp server[1|29.10.2024 12:59:35]: 250 OK
Smtp server[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp client[1|29.10.2024 12:59:35]: MAIL FROM:
Smtp client[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp client[1|29.10.2024 12:59:35]: RCPT TO:
Smtp client[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp client[1|29.10.2024 12:59:35]: RCPT TO:
Smtp client[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp client[1|29.10.2024 12:59:35]: DATA
Smtp client[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp server[1|29.10.2024 12:59:35]: 250 OK
Smtp server[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp server[1|29.10.2024 12:59:35]: 250 Accepted
Smtp server[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp server[1|29.10.2024 12:59:35]: 250 Accepted
Smtp server[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp server[1|29.10.2024 12:59:35]: 354 Enter message, ending with “.” on a line by itself
Smtp server[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp client[1|29.10.2024 12:59:35]: Content-Type: text/html; charset=“Windows-1252”
Smtp client[1|29.10.2024 12:59:35]: Date: Tue, 29 Oct 2024 11:59:35 +0000
…
Smtp client[1|29.10.2024 12:59:35]:
Smtp client[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp client[1|29.10.2024 12:59:35]: .
29.10.2024 12:59:35
Smtp client[1|29.10.2024 12:59:35]:
Smtp client[1|29.10.2024 12:59:35]:
29.10.2024 12:59:35
Smtp server[1|29.10.2024 12:59:35]: 250 OK id=1t5ksp-0007Yo-6W
Smtp server[1|29.10.2024 12:59:35]:
In this log, you can see that the SMTP Server finishes the conversation with 250 OK …
When a send fails, that part is missing:
Smtp client[1|29.10.2024 13:22:10]: Bind Address: IPv4: /83.169.7.135 :48538
29.10.2024 13:22:10
Smtp client[1|29.10.2024 13:22:10]: Remote Address: IPv4: wp1013335.mailout.server-he.de/5.175.14.203 :465
29.10.2024 13:22:10
Smtp server[1|29.10.2024 13:22:10]: 220 wp681.webpack.hosteurope.de ESMTP Host Europe Mail Service Tue, 29 Oct 2024 13:22:10 +0100
Smtp server[1|29.10.2024 13:22:10]:
29.10.2024 13:22:10
Smtp client[1|29.10.2024 13:22:10]: EHLO lvps83-169-7-135.dedicated.hosteurope.de
Smtp client[1|29.10.2024 13:22:10]:
29.10.2024 13:22:10
Smtp server[1|29.10.2024 13:22:10]: 250-wp681.webpack.hosteurope.de Hello lvps83-169-7-135.dedicated.hosteurope.de [83.169.7.135]
Smtp server[1|29.10.2024 13:22:10]: 250-SIZE 52428800
Smtp server[1|29.10.2024 13:22:10]: 250-8BITMIME
Smtp server[1|29.10.2024 13:22:10]: 250-PIPELINING
Smtp server[1|29.10.2024 13:22:10]: 250-AUTH PLAIN LOGIN
Smtp server[1|29.10.2024 13:22:10]: 250 HELP
Smtp server[1|29.10.2024 13:22:10]:
29.10.2024 13:22:10
Smtp client[1|29.10.2024 13:22:10]: AUTH PLAIN xxx=
Smtp client[1|29.10.2024 13:22:10]:
29.10.2024 13:22:10
Smtp server[1|29.10.2024 13:22:10]: 235 Authentication succeeded
Smtp server[1|29.10.2024 13:22:10]:
29.10.2024 13:22:10
Smtp client[1|29.10.2024 13:22:10]: NOOP
Smtp client[1|29.10.2024 13:22:10]:
29.10.2024 13:22:10
Smtp server[1|29.10.2024 13:22:10]: 250 OK
Smtp server[1|29.10.2024 13:22:10]:
29.10.2024 13:22:10
Smtp client[1|29.10.2024 13:22:10]: MAIL FROM:
Smtp client[1|29.10.2024 13:22:10]:
29.10.2024 13:22:10
Smtp client[1|29.10.2024 13:22:10]: RCPT TO:
Smtp client[1|29.10.2024 13:22:10]:
29.10.2024 13:22:10
Smtp client[1|29.10.2024 13:22:10]: RCPT TO:
Smtp client[1|29.10.2024 13:22:10]:
29.10.2024 13:22:10
Smtp client[1|29.10.2024 13:22:10]: DATA
Smtp client[1|29.10.2024 13:22:10]:
29.10.2024 13:22:10
Smtp server[1|29.10.2024 13:22:10]: 250 OK
Smtp server[1|29.10.2024 13:22:10]:
29.10.2024 13:22:10
Smtp server[1|29.10.2024 13:22:10]: 250 Accepted
Smtp server[1|29.10.2024 13:22:10]:
29.10.2024 13:22:10
Smtp server[1|29.10.2024 13:22:10]: 250 Accepted
Smtp server[1|29.10.2024 13:22:10]:
29.10.2024 13:22:10
Smtp server[1|29.10.2024 13:22:10]: 354 Enter message, ending with “.” on a line by itself
Smtp server[1|29.10.2024 13:22:10]:
29.10.2024 13:22:10
Smtp client[1|29.10.2024 13:22:10]: Content-Type: text/html; charset=“Windows-1252”
Smtp client[1|29.10.2024 13:22:10]: Date: Tue, 29 Oct 2024 12:22:10 +0000
…
Smtp client[1|29.10.2024 13:22:10]:
Smtp client[1|29.10.2024 13:22:10]:
29.10.2024 13:22:10
Smtp client[1|29.10.2024 13:22:10]: .
29.10.2024 13:22:10
Smtp client[1|29.10.2024 13:22:10]:
Smtp client[1|29.10.2024 13:22:10]:
Here, the SMTP Server does not reply to the last line; we’ve seen other cases, where the “. on a line by itself” is also not in the log.
This happens with different email providers. We tried to talk to our provider to get some help analyzing this issue (because it seems there is a normal conversation happening between Aspose and SMTP server), but unfortunately they are of no help.
As it’s not happening all the time, it’s hard to create a test case for this issue. Do you have any idea, what could be causing this issue or any hint for further analysis?
Kind regards,
Arne