Comments on: Use TLS/SSL with SMTP in .NET https://www.limilabs.com/blog/use-tls-ssl-with-smtp-net Using Limilabs .net components Fri, 22 Sep 2023 14:00:48 +0000 hourly 1 https://wordpress.org/?v=6.6.2 By: A connection attempt failed https://www.limilabs.com/blog/use-tls-ssl-with-smtp-net#comment-1528 Sat, 05 Nov 2011 10:12:59 +0000 http://www.limilabs.com/blog/index.php/use-ssl-with-smtp#comment-1528 […] Use SSL with SMTP […]

]]>
By: Limilabs support https://www.limilabs.com/blog/use-tls-ssl-with-smtp-net#comment-1527 Tue, 25 Oct 2011 17:40:15 +0000 http://www.limilabs.com/blog/index.php/use-ssl-with-smtp#comment-1527 @Tim

You need to specify correct port to use SSL. From SMTP protocol it’s usually 465. You can also use Smtp.DefaultSSLPort property.

using (Smtp client = new Smtp())
{
    client.Connect("smtp.gmail.com", 465, true);
    // which is equivalent to:
    // client.ConnectSSL("smtp.gmail.com");


To use StartTLS method first connect without SSL (otherwise you’ll get “Unrecognized command” error).

using (Smtp client = new Smtp())
{
    client.Connect("smtp.gmail.com", 25, false);
    // which is equivalent to:
    // client.Connect("smtp.example.org");
    client.StartTLS();

You can check if server supports StartTLS command with following code:

bool supportsTLS = client.SupportedExtensions().Contains(SmtpExtension.StartTLS);
]]>
By: Tim Black https://www.limilabs.com/blog/use-tls-ssl-with-smtp-net#comment-1526 Tue, 25 Oct 2011 16:31:15 +0000 http://www.limilabs.com/blog/index.php/use-ssl-with-smtp#comment-1526 I recently purchased your product and have successfully used it to read emails. Today, I started SMTP tests and am getting an error when I attempt to use the ConnectSSL method that accepts a port #. Also, I get an error if I try to call the StartTLS method. All my test use a Gmail account.

ConnectSSL error:
The handshake failed due to an unexpected packet format.

StartTLS error:
5.5.1 Unrecognized command. u1sm39033912yhu.11

Thanks

]]>
By: Limilabs support https://www.limilabs.com/blog/use-tls-ssl-with-smtp-net#comment-1525 Tue, 04 Oct 2011 15:28:38 +0000 http://www.limilabs.com/blog/index.php/use-ssl-with-smtp#comment-1525 In reply to Hendrik Muus.

@Hendrik

You are right smtp.Ehlo() is missing from the examples (after Connect and after StartTLS methods).
The latest version will not require those.

Edit:
Helo/Ehlo commands are no longer needed in the latest version.

]]>
By: Hendrik Muus https://www.limilabs.com/blog/use-tls-ssl-with-smtp-net#comment-1524 Mon, 03 Oct 2011 11:20:47 +0000 http://www.limilabs.com/blog/index.php/use-ssl-with-smtp#comment-1524 something is missing: ERROR: Send hello first
means do a hello before sending STARTTLS

]]>
By: Limilabs support https://www.limilabs.com/blog/use-tls-ssl-with-smtp-net#comment-1523 Sun, 06 Mar 2011 08:58:35 +0000 http://www.limilabs.com/blog/index.php/use-ssl-with-smtp#comment-1523 @leo
You can download Mail.dll here:
http://www.limilabs.com/mail

]]>
By: leo https://www.limilabs.com/blog/use-tls-ssl-with-smtp-net#comment-1522 Fri, 04 Mar 2011 15:53:45 +0000 http://www.limilabs.com/blog/index.php/use-ssl-with-smtp#comment-1522 How i can get this class named Limilabs,
without this it is not usefull for any body

]]>