You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: when sending mail to a server that supports the SMTPUTF8 extension, using a "To" or "From" address that should require SMTPUTF8 to be emitted, SMTPUTF8 is not emitted and an error is received.
As you can see, despite the fact that the server advertised SMTPUTF8, we didn't emit an SMTPUTF8 command anywhere and thus the server rejected our message.
Code which sent this email:
var message = new MimeMessage();
message.From.Add(new MailboxAddress("[email protected]"));
message.To.Add(new MailboxAddress("ñఛ@example.com"));
message.Subject = "SMTPUTF8 test";
message.Body = new TextPart("plain")
{
Text = @"Test content"
};
using (var client = new SmtpClient(new ProtocolLogger("c:\\temp\\smtp.log")))
{
client.ServerCertificateValidationCallback = (s, c, h, e) => true;
client.Connect("smtp.gmail.com", 587, false);
client.Authenticate("[email protected]", "examplePassword");
client.Send(message);
client.Disconnect(true);
}
This problem happens with the latest version of Mailkit from Nuget as of today, using .NET Framework 4.6.1.
I had a look through SmtpClient.cs and the code looked good; though there's no corresponding test for SMTPUTF8 in SmtpClientTests.cs, so perhaps there should be :) Let me know if I missed anything, or whether I can help on a PR if you can see where the issue is.
The text was updated successfully, but these errors were encountered:
Problem: when sending mail to a server that supports the SMTPUTF8 extension, using a "To" or "From" address that should require SMTPUTF8 to be emitted, SMTPUTF8 is not emitted and an error is received.
Protocol log follows:
As you can see, despite the fact that the server advertised SMTPUTF8, we didn't emit an SMTPUTF8 command anywhere and thus the server rejected our message.
Code which sent this email:
This problem happens with the latest version of Mailkit from Nuget as of today, using .NET Framework 4.6.1.
I had a look through SmtpClient.cs and the code looked good; though there's no corresponding test for SMTPUTF8 in SmtpClientTests.cs, so perhaps there should be :) Let me know if I missed anything, or whether I can help on a PR if you can see where the issue is.
The text was updated successfully, but these errors were encountered: