Skip to content

Commit

Permalink
Fixed STARTTLS support for SmtpClient (regression introduced into 1.0…
Browse files Browse the repository at this point in the history
….15)

Fixes issue #187
  • Loading branch information
jstedfast committed May 12, 2015
1 parent fdf45a8 commit 4cbf9a7
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 @@ -818,7 +818,7 @@ static void ComputeDefaultValues (string host, ref int port, ref SecureSocketOpt
#if !NETFX_CORE
var tls = new SslStream (stream, false, ValidateRemoteCertificate);
tls.AuthenticateAsClient (host, ClientCertificates, DefaultSslProtocols, true);
stream = tls;
Stream.Stream = tls;
#else
socket.UpgradeToSslAsync (SocketProtectionLevel.Tls12, new HostName (host))
.AsTask (cancellationToken)
Expand Down

0 comments on commit 4cbf9a7

Please sign in to comment.