RE: [PHP4BETA] mail with html

From: Date: Sat, 22 Jan 2000 04:40:05 +0000
Subject: RE: [PHP4BETA] mail with html
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-9349@lists.php.net to get a copy of this message
From: Wong Ching Kuen Frederick [mailto:ckwong@cuhk.edu.hk] >how can i use the mail() function to send out html mail instread >of plain text? Make you a deal. Here's a little snippet, you can use it if you turn html off in your posts to the list. :) $sento = "emailaddress@recipientdomaon.whatever"; $page =''; $headers = ''; $rf = fopen($url_to_your_page,"r"); //##open an html document from wherever while (!feof($rf)) { $page .= fgets($rf,1024); } fclose($rf); $subject = "Your subject"; $headers .= "From: youremail@yourdomain.whatever\n"; $headers .= "Errors-To: youremail@yourdomain.whatever\n"; $headers .= "Content-Type: text/html; charset=us-ascii; name=\"index.html\"\n"; $headers .= "Content-Transfer-Encoding: 7bit\n"; $headers .= "Content-Disposition: inline; filename=\"index.html\"\n"; $headers .= "Content-Base: http://www.yourdomain.whatever\n"; mail($sendto,$subject,$page,$headers); Cheers, Mike ------------------------------------------- Windows 2000 is certified not to crash more than once a day, so what is the bootup time, 24 hours? --Sam Liddicott, PHP Mailing List

« previous php.version4 (#9349) next »