hi, I m trying to send email to another email address through my website then this error is coming "System.Net.Mail.SmtpException: 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 at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response) at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, MailAddress from, Boolean allowUnicode) at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) " Please solve this problem. thank u.
I thought I'd share the very simple user error that was tripping me up for this issue. I tried all the suggestions from multiple sites and multiple forum posts, new passwords on my gmail account, enabling less secure apps, logging in to my gmail account from my production server, everything and more.
Then I tried creating a brand new email account in nopCommerce using identical settings. This worked immediately. I compared the two email accounts in nopCommerce. Identical. I changed the password on the not working one and saved and continued. Fail. Then the light bulb moment hit me.
I was editing the default accounts and saving them with the new password but this doesn't save the new password. For some really strange reason, which is crazily obvious in hindsight, I spent several hours not seeing or clicking the change password button.
This is not nopCommerce issue, all you need to enable 3rd party application to access your gmail account. Follow this steps to fix this: 1. Login to your gmail account. 2. Visit this page https://accounts.google.com/DisplayUnlockCaptcha and click on button to allow access. 3. Visit this page https://www.google.com/settings/security/lesssecureapps and enable access for less secure apps. 4. Login to your nopCommerce admin portal and visit this page http://website_name.com/Admin/EmailAccount/List and click edit and click to delete the account. 5. Now use following details: Email address: [email protected] E display name: your website name Host: smtp.gmail.com Port: 587 User: [email protected] Password: password, remember to click change password button if you are editing any existing account SSL: tick to select it Use default credentials: uncheck, do not select it 6. Click on save button above. 7. Test the mailing by entering your email id and click on send test email button.[i][/i][u][/u]