Closed tinohager closed 2 months ago
Yes, if you disable the PIPELINE extension, you'll get that response in the exception message.
client.Capabilities &= ~SmtpCapabilities.Pipelining;
Add that code before sending the message.
I just released MailKit v4.5.0 with the fix for this.
many thanks for the customization
Yes, if you disable the PIPELINE extension, you'll get that response in the exception message.
client.Capabilities &= ~SmtpCapabilities.Pipelining;
Add that code before sending the message.
Unfortunately, this solution does not work, the SmtpProtocolException is still triggered
I just released MailKit v4.5.0 with the fix for this.
I would like to see the last smtp error message available as a field. Instead of mixing a text block from the library with the smtp error code. If someone wants to search for the error they will find nothing in the requested part. I could of course build a logic that removes the first part but I would find that unattractive. 😞
Unfortunately, this solution does not work, the SmtpProtocolException is still triggered
I know, but it would get you the response message.
Describe the solution you'd like
I try to send a mail but the ip is blocked by Spamhaus, in my case it is a dynamic ip from my private internet access. It would be important for me to receive the smtp response I got. Which then triggers the
SmtpProtocolException
is this possible?The exception.Message not contains
550 5.7.1 Service unavailable, Client host [123.123.123.123] blocked using Spamhaus.
it containsThe SMTP server has unexpectedly disconnected.
https://github.com/jstedfast/MailKit/blob/0bb9c61344f7af9d57cc732301f6d4e088c6ff3d/MailKit/Net/Smtp/SmtpStream.cs#L275