Tuesday, 19 May 2015



For some of you encountering error using C#.net and gmail smtp 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".



Error in C# code





Gmail account settings for "Access for less secure apps" is blocked by default and you may enable this by changing the settings  below.

1. Login to your Gmail account and click the "Settings" icon at the upper right side of the corner.


2. Click the "Accounts and Import" and click the "Other Google Account Settings"


3. Click the "Access for less secure apps"(if the settings is "Blocked")


4. Select the "Turn on" radio button.




 Re-run your c# code and check the recipient email.




Note: By turning on the Gmail Settings, you are setting your email account in less secure configurations. It is ideal to create a different email address for your application.


No comments:

Post a Comment