Gmail Error :The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required

后端 未结 25 2842
悲&欢浪女
悲&欢浪女 2020-11-22 02:12

I am using following code to send email. The Code works correctly in my local Machine. But on Production server i am getting the error message

var fromAddres         


        
25条回答
  •  花落未央
    2020-11-22 02:53

    I'm a google apps for business subscriber and I spend the last couple hours just dealing with this, even after having all the correct settings (smtp, port, enableSSL, etc). Here's what worked for me and the web sites that were throwing the 5.5.1 error when trying to send an email:

    1. Login to your admin.google.com
    2. Click SECURITY <-- if this isn't visible, then click 'MORE CONTROLS', and add it from the list
    3. Click Basic Settings
    4. Scroll to the bottom of the Basic Settings box, click the link: 'Go to settings for less secure apps'
    5. Select the option #3 : Enforce access to less secure apps for all users (Not Recommended)
    6. Press SAVE at the bottom of the window

    After doing this my email forms from the website were working again. Good luck!

提交回复
热议问题