You may face an issue while sending email from C# using Gmail account
If your code is fine and your Gmail username/password is correct but you still get the below exception in "client.Authenticate"
gmail p=BadCredentials e23sm4003047wme.35 - gsmtp
Then the problem is in your Gmail account settings, you have to allow less secure app to access your account and use it for sending emails
Go to Gmail settings and search for "Less secure app access" and turn it on, as below screenshot.
References:
https://support.google.com/accounts/answer/6010255
No comments:
Post a Comment