PHP sendmail frustration

I spent hours last night tearing my hair out trying to fix a mystifying PHP problem.

My Irish music website, The Session, has a "forgotten your password?" feature. It’s a typical feature of a community website. If someone can’t recall their username or password, they simply have to enter their email address to have their details mailed to them.

In the case of The Session, they receive an email with the subject line "Your details from The Session" which contains the relevant log-on details.

At least, that’s what supposed to happen. I had an email from someone who attempted to do just that but they were still waiting for their email.

I tested the "forgotten your password?" feature and, sure enough, it wasn’t working. I started to pull my scripts apart to see if I could figure out what the problem was.

I was able to conclude fairly quickly that it wasn’t a fundamental problem with PHP interacting with sendmail: my contact page was still working just fine.

I tried reformulating my scripts. I tried googling for accounts of similar problems. I tried all the user-provided hints and tips on the PHP website.

Eventually, using the "-f" flag in the headers, I was able to have rejected mail routed to my own email account. That’s when I noticed something weird: all the password reminder emails were being flagged as containing a virus. Most odd.

Then it dawned on me: it was the subject line. By simply recognising the words "your details", some server-side spam filter was flagging all the emails as potential carriers of the MyDoom virus.

(This MyDoom virus must be making life really difficult for any system admins who might need to mail out server reports - they’ll need to start getting creative with their subject lines.)

After hours and hours spent hacking and coding, it turned out that the problem was ridiculously easy to fix. All I had to do was change the subject line to something more innocuous like "A reminder from The Session".

On an unrelated but equally geeky note, I have loosed a Lazy Web type meme into the wild in this discussion:

"Maybe somebody could mix iPhoto, Applescript and the image swapping script from this article to come up with a ‘contact sheet’ style export script?"

Have you published a response to this? :

Previously on this day

17 years ago I wrote Darwin Day

Happy Darwin Day!

18 years ago I wrote The Always Amusing Euphemism Generator

Have some fun winding the pork wristwatch.

18 years ago I wrote The new iMac Animations

Here’s a match made in heaven: Pixar have come up with a couple of animated shorts featuring the new iMac

18 years ago I wrote Examples of abuse of the Apostrophe

The Apostrophe Protection Society presents a rogue’s gallery of snaphots depicting some of the worst offenses against the apostrophe.

18 years ago I wrote Java Spectrum Emulator

This is fantastic!