NYCPHP Meetup

NYPHP.org

[nycphp-talk] Send HTML mail with Javascript function

David Krings ramons at gmx.net
Thu Apr 26 19:18:52 EDT 2007


Mark Armendariz wrote:
>  
>> Aniesh joseph wrote:
>>> Hello All,
>>>
>>> I am trying to send one mail with HTML content. To do this, I have 
>>> added HML header to mail function.
>>>
>> I really wonder why? HTML is for port 80, not 21. HTML in 
>> emails is IMHO the biggest waste ever. 
> 
> I'm not sure I can agree, David.  HTML is merely a markup language meant for
> improving how information looks and definitely has a place in our most used
> means of commication.  We have things such as bold, italics, listings, etc
> in all printing apps because how they help us communicate.  Sure, some can
> be mocked in plain text but what's so wrong with someone selecting text and
> hitting ctrl-b to bold the text and having a standard any email client /
> browser will understand.
> 

Those font attributes are in printing apps because they are printing 
apps. Email is and always was intended and therefore designed to handle 
flat ASCII.
The main reason why I recommend against HTML in emails is that most 
popular email clients apparently have problems with either displaying or 
securely handling it (bad handling: Eudora, security problems see e.g. 
here http://tinyurl.com/267we7 [second page, middle]).

You also refer to very basic font styling, which makes me think if there 
is a need to an email specific markup that does only that, but not all 
the stuff that HTML and ECMAScript can do. Let's say, there would be 
such an ESML (email styling markup language), email clients could simply 
ignore anything else but this.

I had frequent problems with HTML emails and finally got convinced that 
turning all this eye candy crap off is the way to go. Since then I never 
came across a single occasion where I thought, gee, some bold or colour 
is really needed here.

In regards to the original post, when HTML in the email isn't direly 
necessary (which I think it isn't) then the problem goes away, because 
it never occurs. Avoidance is a valid approach to problem handling.

David




More information about the talk mailing list