How to set send email from Prestashop using SMTP (gmail)?

Follow these simple steps:

  1. Login to admin panel,
  2. Click on “ Preferences” and then on “Email” tab,
  3. Select “Set my own SMTP parameters”. “For advanced users ONLY” radio button,
  4. SMTP server: your SMPT server, if using Gmail insert – “smtp.gmail.com”,
  5. SMTP user: your email address, e.g. my_prestashop_email@gmail.com,
  6. SMTP password: email password,
  7. Encryption: Gmail uses “TLS”,
  8. Port: Gmail uses “465”,
  9. Click on button “save”,
  10. 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);”.

message

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.

smtp error

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)