Re: [PHP-DB] Plain-text or HTML?
by JeRRy other posts by this author
Mar 13 2006 3:26PM messages near this date
Re: [PHP-DB] Plain-text or HTML?
|
Re: [PHP-DB] Plain-text or HTML?
I have created several successful HTML and text based emails.. Its a secret called mult
ipart MIME. The essence of email really. Just as an attachment is "embedded" into the s
ame file as the images, html part and textual part. All you have to do is using 2 seper
ate boundaries, write out a textual [no HTML formatting, etc, use correct newlines etc] ve
rsion out and then using same content write it into a HTML template version that can i
nclude formatting etc.. Ensure all images used are also encoded and added as multipart MI
ME segments. All this can be generally easily done via some email clients themsel
ves. For example Microsoft's Outlook Express does multipart HTML/Text emails. If you
just go and create a new email in Outlook and type out your content in HTML format [ensure
you've selected Format-> Rich Text HTML] Then save it and grab the message source, you wi
ll clearly see the boundaries it has defined for the alternative MI!
ME part
[the text/html] and the text/plain part. Simply reformat the text/plain part a bit i
f you want. Voila.. in most cases thats ready to rumble .. use it as an example of ho
w to work it into your own email generation functions in php. Works a charm for me ;-)
Good luck, let me know how you go!
-------
Hi,
Thanks for that, now I understand how it works. Seen the code, now I will play with it a bi
t. Did a few tests and found on some cases the following:
1- Yahoo! Mail is tricky to have HTML emails for, some emails, unless carefully designed, co
me out dodgy in formation when you view the email in Yahoo! Mail Web Format.
2- Hotmail seems to like HTML and has a better understanding of how to manage the emails in
their Mail Live! Program
3- Outlook loves HTML and uses it cutely
4- Another web based email at www.tasmail.com formats funny and opens the html email in an a
ttachment, does not always display good.
5- www.rock.com webmail dislikes HTML even though they claim HTML emails are supported.
So the end result is some like some don't, some like to a degree and some don't. There does
not seem to be a good solution even with formatting in HTML format. I'm just wondering how
companies like Yahoo! and Hotmail send theirs out, tried viewing their source but sometimes
their tricky. And being an owner of the servers they have more power over how emails are s
ent and displayed.
Sure they have a source email but they can shade out reply, add more code somewhere hidden e
tc away from the source area. But their emails seem to come out fine, even when you redirec
t the emails to a email that does not like HTML a real lot they seem to display as they shou
ld.
I know of a few programs on the net for plain-text to html emails, but the free ones are not
a good solution, not sure of the paid ones.
J
Attachments:
unknown1
Thread:
JeRRy
Julien Bonastre
JeRRy
Bastien Koert
JeRRy
|