Easy way to embed inline images in email with PHPMailer. Tested and working with PHPMailer on GMAIL, Yahoo Mail and Mac Mail app.
(This article has an advanced technical level, written for people with PhpMailer experience.)
PHPMailer 5.1 in PrestaShop 1.4
Trying to integrate PHPMailer in Prestashop and use it instead of SWIFT Mailer 3 (which is the default mailer script included with Prestashop 1.4), I spent hours to no avail and was getting the Could not instantiate mail function error.
The mail() function by itself was working correctly before and after loading Prestashop and every passed argument seemed to be correct. I did get the “Bad parameters to mail() function, mail not sent” error for mail() too.
Debugging and Abracadabra!
I’ve done lots of debugging and found in my case that the following functions were causing the error, when passing the $Subject parameter to mail():
To solve the “Could not instantiate mail function” error in PHPMailer, […]