If you are using PrestaShop you may have come across the bug where if a customer enters their name or address in CAPITAL letters e.g. ME@DOMAIN.com it causes the e-mails to display incorrectly. Instead of their first and last names being displayed, it shows HELLO {FIRSTNAME} {LASTNAME}, THANKS TO CREATE A COSTUMER ACCOUNT {SHOP_NAME}.
The good news this is an easy problem to fix and requires only a one line of coding to be changed
Open your hosting account and open the file classes/Mail.php. Usually this can be done via a hosting control panels file manager. To edit the file in cPanel's file manager, right click on the file and click edit.
Scroll down to line 556 and find
$swift->registerPlugin(new \Swift_Plugins_DecoratorPlugin(array($toPlugin => $templateVars)));
Now delete this line (or add a // in front of it to comment it our) and add the new line below instead:
$swift->registerPlugin(new \Swift_Plugins_DecoratorPlugin(array(self::toPunycode($toPlugin) => $templateVars)));
Thats it! Do a quick test by creating a new account on your site and you should see the e-mails come through correctly.
If this guide has helped you or if you feel it could be improved, please let us know in the comments below.
![]() |
Which hosting company do you use? I'm Philip and this little website is my online side project. I often get asked which company I use for my website projects. Most of the hosting companies out there are no longer independent but instead owned by one of the big hosting giants who generally offer poor or average services (in my opinion). Krystal.uk (the company I use) are still independent (UK based) and go against everything the big companies stand for. Fast servers, good tech support and they actually re-invest a huge chunk of their profits to keep improving their services. All Krystal customers can offer people a £20 referral discount. If you do move to Krystal, please consider using the discount code "WMG" to get £15 off your hosting order (Krystal will give me the remaining £5 for referring you). Thanks again and happy surfing. |