Get Free Audit

How Special Symbols Can Affect Store Emails Delivery in Prestashop

Mar 9, 2016

1091 Alex Simonchik

How Special Symbols Can Affect Store Emails Delivery in Prestashop

Recently we faced the problem, that customers did not receive email notifications from the client’s Prestashop installation.

For a long time we couldn’t reproduce this issue: MTA settings were correct, Mandrill API did not return any errors. Issue exited only for a couple customers, while hundreds did not get such error at all.

Luckily we new the email address of one of clients who complained about the issue, so we created additional development instance and replaced customer’s email with ours. So now we could repeat all process like a real customer with his unique data. We tried to send an email for this user (the email was supposed to go to our email address). And we didn’t receive any. This current Prestashop installation uses Mandrill as the SMTP server, but there was no any information about customer’s emails in the “Outbound” section. Though debug log showed that the API call to the Mandrill was sent and did not return any error.

To cut a long story short, after some time we finally spotted the problem. The thing was that customer used Danish special characters (such as Æ,Ø, Å) in his username. Also we found the following post on the forum.

The solution was to encode “To name” field with the base64 encoding. After this fix all letters were delivered to the client.

Our solution was to make override for the class of the function Mail::Send

Andrey_Dubina
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Andrey

Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Andrey

1 comment

  1. Hi Alex,

    Nice catch! My emails were going out (using Mailgun), but occasionally with a “to” title of e.g. “=?UTF-8?B?TcKqIGRlbCBNYXIgR29tZXogQmFycm9zbw==? “. Your fix solved my problem.
    I don’t have special characters in our “from” field, but I would imagine the problem would be the same there, correct?

    Thanks!
    Ed Eichman

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *