I h8 quoted printable

Every time I write something to read e-mails, I forget about quoted printable.  I have some kind of mental block about it.  It is the bane of my e-mail reading existence.  I got abuse mail from Engadget the other day.  First I was surprised they use Google for mail.  I don’t know why this still surprises me, but I find it hard to take a company seriously who does this with their mail.  It tells me that what something’s perceived cost is, is really the only thing that matters to them.  Second, the mail contained a Quoted Printable part.  My poor regex was laid low by Quoted Printable.

What’s this in regard to?  A future release of TightURL will include a script that analyzes inbound abuse complaints by e-mail and replies to the sender when appropriate.  Sadly after realizing it was going to be a major undertaking, and looking around for acceptable PHP code to properly parse the complicated mish-mash that is our beloved Internet mail, I ended up with another class from PHPClasses, 80K of BSD licensed PHP code to parse an e-mail.  It continues to bother me that frequently for the sake of something like parsing an e-mail, something which used to be pretty simple, I end up with a class or library that’s several times the size of the script that uses it.

This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to I h8 quoted printable

  1. Josh says:

    a LIBRARY? Really?

    quoted_printable_decode()
    (PHP 4, PHP 5) ~~ convert a quoted-printable string to an 8 bit string
    http://php.net/manual/en/function.quoted-printable-decode.php

  2. ron says:

    I actually wrote an e-mail gateway back in the dark ages when NetWare MHS was the most important thing in the email world.  One thing I’ve learned is that everyone thinks they know how email works, and almost nobody does.

    If you’re not parsing mail with a library, you’re doing it wrong.  I was doing it wrong.  I just cry a little that my codebase doubled or something just because I need to read emails (in any valid format, accurately).

    That said, we seem to be long beyond the days when you can run a simple public URL shortener.  The reference installation at tighturl.com wouldn’t be viable anymore without being able to feed abuse mail through a script upon delivery, or to run anti-abuse tasks.

Leave a Reply

Your email address will not be published. Required fields are marked *