Error: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first


Error: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first.

Description: This error occurs when you try to send an email using .Net code and the email account configured to send email is a GMAIL account which having https enabled. You can view the settings from tab Setting -> General -> Browser connection Always use https.

Solution: Enable SSL to true from .Net code.

var client = new SmtpClient();
client.EnableSsl = true;

More discussion about secure connection in GMail and others: http://security.stackexchange.com/questions/6489/what-steps-do-gmail-yahoo-mail-and-hotmail-take-to-prevent-eavesdropping-on-e

Advertisements

2 thoughts on “Error: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first

  1. The SMTP server requires a secure connection or the client was not authenticated. this is the critical error I get when I try to send a message or contact on my website, do you have any information please

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s