Re: css in mail()

From: Date: Wed, 21 Feb 2007 01:02:23 +0000
Subject: Re: css in mail()
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-249150@lists.php.net to get a copy of this message
Hi, On Wednesday 21 February 2007 01:14, Richard Lynch wrote: > On Mon, February 19, 2007 10:56 am, Sancar Saran wrote: > > On Monday 19 February 2007 17:03, Danial Rahmanzadeh wrote: > >> how can i use css with mail()? > >> thank u > > > > <?php > > $data =''; > > $fp = fopen > > ("site/themes/".$arrStat['theme']."/css/main.css","r"); > > while (!feof($fp)) { $data.= fgets($fp, 16384); } > > > > $mail=" > > <html> > > <head> > > <title>Title</title> > > <style>".$data."</style> > > </head> > > <body> > > Html content > > </body> > > </html>"; > > > > mail('anrah@gmail.com', 'You are welcome', $mail); > > ?> > > No. > > This will only work on very badly-broken email clients. Really ? I did not have to much choices to check it, In KMAIL everything looks nice. Thanks for info > I believe, in fact, that the only email client broken enough for this > to work is Outlook. > > Though I suspect some very lame web-based email client might actually > work, come to think of it.

« previous php.general (#249150) next »