Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Magento transactional emails somehow get additional escape characters added to the headers.

Magic_quotes are disabled in PHP.

Postfix uses Elastic Email as a relay. According to Elastic, e-mail are received correctly.

Then majority of clients receive the emails correctly, except those who are behind filter. After reviewing the logs, the messages are rejected by because additional slashes are added to the emails.

Has anyone ever come across this issue? Which piece could be at fault? Again, majority of customers receive emails perfectly fine.

share|improve this question

When you say "perfectly fine", do you mean that most customers receive e-mails that don't have slashes in them? Or are you simply complaining about messagelabs rejecting your e-mails?

As far as the extra quotes, if it's really happening to everyone, I'll wager that you're not really turning off magic_quotes_gpc and magic_quotes_runtime -- you've probably turned it off in the main config, and then something's turning it back on (a rogue .htaccess file, for instance). Double (and triple) check by running phpinfo() in the same directory as the script that's causing the trouble.

Based on your comments, I'm going to have to say that it's a messagelabs problem -- if you send out an e-mail and it gets to the recipient differently to how you sent it, it's the fault of some intermediary mangling the data in transit. I can't offer any suggestions to fix it, however; I can only shake my head at the continued insanity of the world.

share|improve this answer
Thank you womble, by perfectly fine I mean that non-messagelabs customers do not have slashes added to their headers. I've reviewed detailed headers on other accounts, and they are clean. Is this a known Messagelabs issue? Is there a way to fix it? – djdy Jul 19 '11 at 14:51
P.S. And yes, gpc, runtime, and even sybase magic quotes are turned off. – djdy Jul 19 '11 at 14:53
up vote 0 down vote accepted

The problem turned out to be a bug in Elastic Email service. After reporting it to them, they fixed it within a few hours.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.