NYCPHP Meetup

NYPHP.org

[nycphp-talk] Send HTML mail with Javascript function

Mark Armendariz lists at enobrev.com
Thu Apr 26 14:34:31 EDT 2007


 
> 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.

As for images within, it can easily be misused, but so can ascii art and
bananas in tail pipes.  Just because it's handled poorly and poorly utilized
doesn't mean it should be done away with.

As for Javascript in emails, I'm not sure that email clients will run it,
and if they do, I expect they would block XHR for security risks.  I really
really hope they would.  XHR in emails worries me.  If you're trying to
track emails, consider adding an image and tracking that image's load -
allowing the user the option to turn on their images in most modern clients.
Or even better, give them a link to click and let them choose to be tracked
(if that's what you're using it for).

Mark




More information about the talk mailing list