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

Last Reply 3 months ago By dharmendr

Posted 3 months 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

Posted 3 months 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