How to set send email from Prestashop using SMTP (gmail)?
Follow these simple steps:
- Login to admin panel,
- Click on “ Preferences” and then on “Email” tab,
- Select “Set my own SMTP parameters”. “For advanced users ONLY” radio button,
- SMTP server: your SMPT server, if using Gmail insert – “smtp.gmail.com”,
- SMTP user: your email address, e.g. email@example.com,
- SMTP password: email password,
- Encryption: Gmail uses “TLS”,
- Port: Gmail uses “465”,
- Click on button “save”,
- If you wish to test – add email on “Test your e-mail configuration” and click “send an e-mail test” button.
In our experience, the most common problem is the SSL / TLS extension. If you have some web development skills – the problem will not be difficult to resolve.
First of all, we need to identify problem. By default Prestashop does not show email errors, so we need to set it manually.
Open file: Prestashop root folder/js/sendMailTest.js. Before “if (ret == “ok”)” add “console.log(ret);”.
Save file and refresh Back Office >> Preferences >> Email page.
Open browser firebug (Chrome: from right menu select “Inspect elements”) and click “Send a e-mail test”. You should now get an error message.
If problems like in example – you need to enable SSL/TLS extension for your Apache/PHP installation.
First of all make sure you have libeay32.dll and ssleay32.dll files in your /apache/bin folder. Edit your php.ini file and add: extension=php_openssl.dll.
Then restart Apache server and your SSL should be loaded.
You still receive an error like this:
SMTP -> ERROR: Password not accepted from server: 000-5.7.14 Please log in via your web browser and 000-5.7.14 then try again.
SMTP -> ERROR: MAIL not accepted from server: 000-5.5.1 Authentication Required.
The following From address failed: XXX@gmail.com : MAIL not accepted from server,000,5.5.1 Authentication Required.
SMTP server error: 5.5.1 Authentication Required.
In that case please check Gmail account security settings:
https://www.google.com/settings/security/lesssecureapps (Access for less secure apps – Turn on)
https://accounts.google.com/DisplayUnlockCaptcha (Allow access to your Google account – Continue)