Skip to content

Commit

Permalink
Only enable EnsureNewLine in SmtpClient.Send*() if CHUNKING is not su…
Browse files Browse the repository at this point in the history
…pported

Partial fix for issue #895
  • Loading branch information
jstedfast committed Aug 23, 2019
1 parent c66b74b commit fb90b4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MailKit/Net/Smtp/SmtpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2109,8 +2109,8 @@ async Task SendAsync (FormatOptions options, MimeMessage message, MailboxAddress
throw new ServiceNotConnectedException ("The SmtpClient is not connected.");

var format = options.Clone ();
format.EnsureNewLine |= (Capabilities & SmtpCapabilities.Chunking) == 0;
format.NewLineFormat = NewLineFormat.Dos;
format.EnsureNewLine = true;

if (format.International && (Capabilities & SmtpCapabilities.UTF8) == 0)
format.International = false;
Expand Down

0 comments on commit fb90b4a

Please sign in to comment.