Re: css in mail()

From: Date: Tue, 20 Feb 2007 09:20:56 +0000
Subject: Re: css in mail()
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-249066@lists.php.net to get a copy of this message
Sancar Saran wrote: > $mail=" > <html> > <head> > <title>Title</title> > <style>".$data."</style> > </head> > <body> > Html content > </body> > </html>"; I stopped being a designer quite a long time ago, and I never learned how to compose HTML e-mail because I think it's a blight. I do, however, work with some talented designers, and they (and Google) tell me that the above is basically a terrible idea. Apparently e-mail clients do not support properly formed HTML very well. It is suggested not to use <html></html> tags or a <head></head> (most clients apparently strip the HTML header). The CSS should be inclined in the body, as wrong as that is in HTML/XHTML.

« previous php.general (#249066) next »