Description
To test email functionality/notifications, enable SMTP to send an email. This article describes how you can use your Gmail account to send emails from your local machine.
Resolution
- Add the following settings inside <configuration></configuration>tag in the web.config file. You can add it to the end of the file.
<system.net> <mailSettings>
<smtp deliveryMethod="Network" from="vinit.gavankar@gmail.com">
<network
host="smtp.gmail.com"
port="587"
enableSsl="true"
userName="Gmail Uid"
password="Gmail account PWD"
defaultCredentials="false"/>
</smtp>
</mailSettings>
</system.net> - If you get the following error message then:
We're sorry. We weren't able to set up your SMTP. Learn more using the error message below. 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:
Try this first:
- Log in to your Gmail account.
- Go to My Account > Sign-in & Security > Connected apps & sites
- Enable Allow less secure apps.
- Go to More controls > Security > Basic Settings.
- Scroll down to click Go to settings for less secure apps.
- Select enforce.
- Click Save.
See also SMTP errors - what do they mean?
Please sign in to leave a comment.