cancel
Showing results for 
Search instead for 
Did you mean: 

Mageplaza SMTP Magento 2.3.3 Issues

SOLVED

Mageplaza SMTP Magento 2.3.3 Issues

Using Magento 2.3.3 and Mageplaza SMTP extension. Got errors with when gmail account "Less Secure App Access" is turn OFF. 

 

1. Could not open socket: stream_socket_client(): unable to connect to tcp://smtp.gmail.com:465 (Network is unreachable)

 

2.  5.7.8 Username and Password not accepted. Learn more at 5.7.8 support google com / mail / ? p=BadCredentials y5sm2165638ilk.83 - gsmtp 

 

It ONLY WORKS if "Less Secure App Access" is turn ON, which Google does not recommend.  I will appreciate any suggestions.  Thanks for your attention.  

 

Less secure app settingLess secure app setting

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Mageplaza SMTP Magento 2.3.3 Issues

Hello @Sheba 

 

if you want to use Google SMTP then you must need to enable a less secure app setting.

 

More info:-

https://www.mageplaza.com/blog/configure-gmail-smtp-magento-2.html

 

if works then mark as solution.


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

View solution in original post

Re: Mageplaza SMTP Magento 2.3.3 Issues

It's just a Google thing. It's a pain to integrate their mail with anything that's not google or their partner.

View solution in original post

5 REPLIES 5

Re: Mageplaza SMTP Magento 2.3.3 Issues

Hello @Sheba 

 

if you want to use Google SMTP then you must need to enable a less secure app setting.

 

More info:-

https://www.mageplaza.com/blog/configure-gmail-smtp-magento-2.html

 

if works then mark as solution.


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Mageplaza SMTP Magento 2.3.3 Issues

It's just a Google thing. It's a pain to integrate their mail with anything that's not google or their partner.

Re: Mageplaza SMTP Magento 2.3.3 Issues

Thanks for your response.

Re: Mageplaza SMTP Magento 2.3.3 Issues

The only solution that worked for me:

 

SELINUX BLOCKING If you are getting error message like SMTP -> ERROR: Failed to connect to server: Permission denied (13), Permission denied, and your are hosting on RedHat / Fedora / Centos this is more than likely cause by SELinux preventing PHP or the web server from sending email. . Using the getsebool command we can check if the httpd daemon is allowed to make a connection over the network and send an email:

 

getsebool httpd_can_sendmail
getsebool httpd_can_network_connect

 

 

This command will return a boolean on or off. If it’s off, we can turn it on:

sudo setsebool -P httpd_can_sendmail 1
sudo setsebool -P httpd_can_network_connect 1

 

Thanks to MagePal here is their full documentation

 

Re: Mageplaza SMTP Magento 2.3.3 Issues

I turn on the Gmail policy to allow low secure apps

 

and then select TLS instead SSL and use the port 567 instead 465

 

this works for me

 

+juanremi