Search Persits Software Knowledge Base

 

Article PS101117178

530 5.7.0 Must issue a STARTTLS command first error

Problem Description

AspEmail generates the following error when trying to send a message using an SMTP server requiring TLS:

530 5.7.0 Must issue a STARTTLS command first

Solution

The Transport Layer Security (TLS) protocol encrypts all traffic between the email-sending application and SMTP server. TLS is the successor to SSL and very similar to it.

Some SMTP servers including Google's popular free smtp.gmail.com require TLS and reject all non-TLS-compliant email clients by generating the error above.

The versions of AspEmail prior to 5.1 do not support TLS and therefore cannot be used with SMTP servers requiring it, including smtp.gmail.com.

AspEmail 5.1+ does support TLS. To use AspEmail with a TLS-enabled SMTP server, you need to set the property TLS to True, as follows:

Mail.Host = "smtp.gmail.com"
Mail.Username = "MyGmailAccount"
Mail.Password = "He!!o^World!"
Mail.TLS = True
...
Mail.Send

To download the latest version of AspEmail, please visit www.aspemail.com. Upgrades are free for registered users.

Created: 11/17/2010 5:43:15 PM
Last Modified: 11/22/2010 11:45:11 AM

Copyright © Persits Software, Inc. 1998 - 2018
For technical support, write to support@persits.com.