HTML emails - duplicating plain text version

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
EoN
Forum Newbie
Posts: 22
Joined: Thu Oct 11, 2007 5:57 am

HTML emails - duplicating plain text version

Post by EoN »

Hi All,

I read in the Swift documentation, that when sending out HTML emails, you should "always duplicate the same email in plain text and send the message as a multi-part message." (so as to help the email not be incorrectly marked as spam)

When it says 'duplicate', how identical should the text version be? For example does it mean - exactly the same, minus the HTML tags & images? Or just approximately the same? Does it matter?

Is there actually a programmatic way to convert a HTML part to a text part, or should I just attach an approximate text equivalent manually?

I just want to make sure I"m using best practice for this!

Thanks in advance,

EoN
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: HTML emails - duplicating plain text version

Post by Chris Corbyn »

It's not that strict. Just don't send a plain text version that says "Read the HTML version" or anything to that effect ;)

I just do it manually.
robble
Forum Newbie
Posts: 11
Joined: Fri Aug 24, 2007 6:34 am

Re: HTML emails - duplicating plain text version

Post by robble »

Hi Eon

I've been using a php class which converts html to text. It's simple but effective, it even does appropriate things like converting <h*> tags to capitals for plain text - quite handy. I'm sure there's loads of scripts out there that will automate html 2 text conversion.

Get the script I used from Jon Abernathy:
http://www.chuggnutt.com/html2text.php
Post Reply