I have an ASP.NET web API that I\'m trying to use to send an email. I\'m getting authentication issues using smtp.gmail.com and 587. I\'ve seen several links saying to tog
Google changed some time ago (one or two years ago) possibility to use its SMTP servers. Google now requires higher level of security and authentication. However there still is a possibility to use it without 'Allow less secure apps' option, but you cannot use your standard google username and password.
Here is how to do it (in short):
- Turn on 2-Step Verification in your gmail or google apps account in “My account / Sign-in & security”,
- then (in “My account / Sign-in & security / App passwords”) it is possible to generate a special password for access from other applications (without turned on 2-Step Verification you can not get there)
- this created app password (and your google e-mail account as a username) you can then use as your SMTP login.
That's all.