I got a report from one of my Tasks Pro™ beta users that the tasks created from e-mails were containing a bunch of HTML when the e-mail was sent in HTML format. My testing indicates that when an HTML e-mail that includes a plain text version, Tasks Pro™ correctly grabs the plain text version and puts that in the notes field. I’m guessing that the problem e-mails are HTML formatted and don’t include a plain text version.
I’m tempted to rant about why HTML e-mail in general is such a bad thing, and why HTML e-mail without a plain text version is just evil, evil, EVIL! But I’ll resist.
Instead, I’ll ask if someone can tell me how I can create an HTML-only e-mail. I’ve tried with Thunderbird and Mail.app to no avail. I’m not willing to install Outlook or Outlook Express, so please don’t go there either. 🙂
If it’s easy to identify these e-mails, I’ll throw a strip_tags() call in there as a
fix
This post is part of the project: Tasks Pro™. View the project timeline for more context on this post.
To identify if it is an HTML message, couldn’t you just parse the email, looking for:
Content-type: text/html
in the headers?
The text/html is set for e-mails that contain a text/plain version as well.
There is a lot of information in the ‘parts’ of an e-mail – I need to determine which e-mails have an HTML part and no plain text part. This isn’t terribly hard, but I have no test case.
Alex,
If you add any kind of formatting to the e-mail in Thunderbird when you send the e-mail it will prompt you as to how you want to send the e-mail. Your options are HTML and Plain Text, Plain Text Only, and HTML only.
Try gmail or yahoo mail? (rich text mode on either). I was writing a webmail program and I want to say one of them did it.
But if you don’t want any of the html formatting, why not just strip_tags() it anyhow and then you’re fine either way. Maybe not always 100% efficient, but … not that big of a waste if it’s really a concern.
I would just grab a copy of phpMailer and write a 5 line script to send an HTML only email.
http://phpmailer.sourceforge.net/
Stephan – interesting, it didn’t do that for me.
matt – Yahoo mail said rich text was only available in IE 5.5 or later, Gmail didn’t show an option.
Ian – now that is a good idea.
Alex, go into your options and select “Composition”. Click on “Send Options”, select “Ask me what to do” from the drop down and you should be set to go. It sounds like your messages are being converted to plain text before they are sent.
Wow, Ian got to my suggestion first. PHP Mailer works great, and lets you skin that emailing cat any way you like it.
They are being sent with a HTML version and a plain text version – as is standard. If you’ve ever gotten HTML only e-mail on a cell phone or PDA, you’ll understand why most e-mail clients send both.
My product deals with email integration as well. A few hours with the PHP IMAP extension is enough to drive anyone completely nuts.
Alex, my reasoning for having you choose “HTML Only” is that there might be some catch on the server that is parsing the plain text when it’s sent instead of the HTML. Does that make any sense or am I just rambling?
I was able to extract both parts – the HTML and the plain text version.