SMTP Error: The server response was: 5.7.0 Must issue a STARTTLS command first

Last Reply one month ago By dharmendr

Posted one month ago

While sending email getting 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. i16sm1806350pag.18

You are viewing reply posted by: dharmendr one month ago.
Posted one month ago

Hi rani,

You need to set EnableSsl property of SmtpClient class object to true.

Gmail uses secure channel for sending emails and you need to enable SSL security while sending emails through your application.

Then you need to Turn On the Less Secure Apps setting in your account.

For more details refer below article.

GMAIL Error: The SMTP server requires a secure connection or the client was not authenticated