Configure Prestashop 1.7 to work with SMTP
Use PHP's mail() as quick & easy solution
The easiest way how to enable email sending in Prestashop is using PHP's mail() functionality. This can be enabled in Backoffice / Advanced Parameters / E-mail, at the bottom of config page with option "Use PHP's mail() function (recommended; works in most cases)"
It however doesn't work with all hosting providers. Sometimes this method forbidden, you can try to write your hosting to enable it, but should they not agree, here are other options.
Enable direct SMTP server sending
It's more complicated to set-up, and you need to have an access to SMTP sever (which most hosting providers offer by default), but these trades are worth it - with custom SMTP set-up, you can typically make email more trusted and thus avoid landing in SPAM folder.
To configure it, head to E-mail configuration settings, as mentioned in PHP's mail() section above and there, switch to "Set my own SMTP parameters (for advanced users ONLY)".
This is how it would typically look like:
There you can set parameters obtained from your hosting provider.
Enable DKIM for extended validation and thus improve email deliverability
How to check if my domain has DKIM enabled?
Head to this useful tool - dkimcore.org/tools/ - where you can check your domain's DKIM keys.
Often times, DKIM will be supported by your hosting company, you just need to ask them to enable it for your domain. Should they maintain your Nameservers as well, they might add DKIM TXT record. If not, e.g. if you use CloudFlare and have your name servers there, you need to add this manually. Also here, the best bet is to write hosting company to tell you correct TXT record.
How to make deep SwiftMailer debugging with SMTP setup
Should you still need communicate with your hosting provider possible problems with emails, SMTP logs from SwiftMailer in Prestashop 1.7 is very useful. However, they're not enabled by default, so let's make some modification directly in Prestahop core file:
File classes/Mail.php, locate line
$swift->registerPlugin(new Swift_Plugins_DecoratorPlugin(array($toPlugin => $templateVars)));
And bellow add:
$logger = new Swift_Plugins_Loggers_EchoLogger();
$mailer->registerPlugin(new Swift_Plugins_LoggerPlugin($logger));
After that, go to Email configuration in Prestashop and try to send test email - and look at ajax response to see the actual Prestahop - SMTP server configuration, that would tell you real truth about the possible integration problems.