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 '18 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 '18 at 16:11
  • I'll try your link later :3 thanks for helping me.
    – fudu
    Dec 1 '18 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 '18 at 1:39

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.


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, privacy policy and cookie policy

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