This project is read-only.

Unable to send messages through via SMTP

Sep 9, 2014 at 6:51 PM
Edited Sep 10, 2014 at 12:19 AM
Connection to SMTP service fails during the SSL handshake. It seems that it requires a TLS connection.

Could somebody post some code to successfully connect and send e-mails using this library and

The following settings should work for, but seems that this library is not using TLS when connecting. There are no issues with Gmail and other regular SMTP services.

•Server address:
•Port: 587
•Authentication: Yes
•Encrypted Connection: TLS

The outcome is just something similar to the following:

Test method Tests.TestEmail.SendEmail threw exception:
System.IO.IOException: The handshake failed due to an unexpected packet format.
Result StackTrace:
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
at ActiveUp.Net.Mail.SmtpClient.DoSslHandShake(SslHandShake sslHandShake) in ....