2
votes

My Opencart version is 3.0.2.0

My problem is that email is not working recently. I am using gmail smtp and it was working few days before. But suddenly it stopped working and while checking error log I found below log.

PHP Fatal error: Uncaught exception 'Exception' with message 'Error: Password not accepted from server!' in /home/MYFOLDERNAME/public_html/system/library/mail/smtp.php:206

I am using Linux hosting.

And below is my mail configuration

Mail Engine : SMTP, SMTP Hostname : tls://smtp.gmail.com, SMTP Username : [email protected], SMTP Password : mygmailpassword, SMTP Port : 587

I have enabled less secure apps in https://myaccount.google.com/lesssecureapps?pli=1 and also 'Account access enabled' in https://accounts.google.com/b/0/DisplayUnlockCaptcha.

My gmail account is active and I can login in web.

Also I tested the same with below details, but still it is not working.

SMTP Hostname : ssl://smtp.gmail.com & SMTP Port: 465

Please help me on this.

Thanks in advance

1

1 Answers

1
votes

Extra settings needed to be set if you're using G Suite, especially use it as your domain mail

  1. go to https://admin.google.com and login
  2. select "Security" on your console panel
  3. select "Basic Settings"
  4. "Less secure apps", "Go to settings for less secure apps" https://admin.google.com/AdminHome?fral=1#ServiceSettings/notab=1&service=securitysetting&subtab=lesssecureappsaccess
  5. Choose the 3rd one :) https://i.stack.imgur.com/tFxUw.png
    Disable access to less secure apps for all users
    Allow users to manage their access to less secure apps
    Enforce access to less secure apps for all users

Hope this can help