+2 votes

We plan to use Amazon's Simple Email Service (SES) to deliver our e-mail. It's working fine when I use the Microsoft System.Net.Mail library, but not when I use the Limilabs Mail.dll.

This code works fine:

Dim MailServer As New Smtp()
MailServer.ConnectSSL(MailServerName)

But when I get to these statements:

Dim Email As IMail = Message.Create()
MailServer.SendMessage(Email)

I get the following exception:
"Tried to read a line. No data received. Please make sure that antivirus and firewall software are disabled or configured correctly."

My Amazon SES account is configured to use TLS on ports 25, 465 or 587.

What am I doing wrong?

by

1 Answer

0 votes
 
Best answer

If you are using TLS (the name should rather be STARTTLS), use Connect method and then StartTLS:

smtp.Connect("server"); // this uses port 587 by default
smtp.StartTLS();
smtp.UseBestLogin("user", "pass");

StartTLS is optional, as if STMP server is correctly configured, Mail.dll is going to use STARTTLS command automatically. However using this method explicitly, ensures that the connection is secured and credentials are always send over secured channel.

You can find more on SSL/TLS/STARTTLS/STLS here

by (297k points)
...