I was setting up database Mail in SQL Server 2008 R2 using Gmail SMTP settings (to testing) but not able to send mail as i was facing the below error "
Message :
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2016-05-13T14:47:58). Exception Message: Cannot send mails to mail server. (The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at).
To troubleshoot i tried with Port enabled in firewall, changing port numbers but no luck got failed. Then after googling i find the below steps which made me to send mails successfully.
You may simply have to re-verify your client's access via the web. To do that:
- First sign into the Gmail account in a browser on the device where you are setting up your client
- Go here and enable access for "less secure" apps: https://www.google.com/
settings/security/ lesssecureapps - Then go here: https://accounts.google.
com/b/0/DisplayUnlockCaptcha a nd click Continue. - Then straightaway go back to your client and try again
However, if you use 2 step verification on your GMail account, don't forget that you will also need an application specific password for your client/device. See http://support.google.com/ mail/bin/answer.py?hl=en& answer=1173270 for how to do that
If this doesn't worked then try with sending gmail from client machine if it works ok else enable the java settings in browser options.
Thanks for sharing Good Information
ReplyDeleteSql server DBA Online Course Bangalore