I'm trying to send an email by extension Mageplaza Smtp and when I config, and send mail, at first, when i enter Username and Password and click "Test now" in "Send test email" section, it sends email successfully as expected.

But then, I click "save config", and then the page reloaded. After that, i click "Test now" and the page show an error message says "Username and Password not accepted".

May i do something wrong?

Here are my config, please take a look: enter image description here enter image description here enter image description here

Also here is default Magento config, I've change Enable to "No". enter image description here


  • I hope you are trying to send emails after clearing cache. Also would suggest to ensure if you are trying right username and password by logging in into the account being used. Alternatively you can try github.com/magepal/magento2-gmail-smtp-app if there is some issue with current extension. Dec 1, 2018 at 15:31
  • Hi @HimmatPaliwal, the first thing i've thing of when meet this issue is clearing cache. So of course i did it but it's no use, and second, my email account is working fine in gmail :)
    – fudu
    Dec 1, 2018 at 16:11
  • I'll try your link later :3 thanks for helping me.
    – fudu
    Dec 1, 2018 at 16:12
  • Hi, i've try magepal smtp, which is the extension in the link you gave me yesterday, and it have the same error, maybe i was config something wrong ? Everything i config i've take a picture in the post, please take a look thanks :(
    – fudu
    Dec 3, 2018 at 1:39

4 Answers 4


Try attached configuration with Magepal extension and let me know if it works:

enter image description here


I have faced the same error with Mageplaza extension and the solution is:

Either turn on less secure apps https://myaccount.google.com/u/1/lesssecureapps?pageId=none

OR use an application password instead of your Gmail account password https://support.google.com/mail/answer/185833?hl=en

and don't forget to flush the Magento cache after updating the password or username.

  • To help keep your account secure, from May 30, 2022, ​​Google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password. Nov 23, 2022 at 9:16

Authentication: set to Login

Username: set to the username name of the Gmail account that you want to be in charge of sending all the emails within your store

Password: enter your app’s password

You’ll want to create an app password here and use the generated app password for your SMTP configuration.

Read more here -> Configure SMTP Settings for Sending Emails in Magento

enter image description here


this configurations works!

Important change the host to smtp.googlemail.com (thanks Swift Mailer)

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.