Re: mail function

From: Date: Fri, 21 Dec 2001 07:04:58 +0000
Subject: Re: mail function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-78424@lists.php.net to get a copy of this message
If you declare a header after you used html or echoed something, it will fail. header("Location: http://www.winwhole.com.hk/sent.php") HTH. Here is some code that works: <?php session_name("ESLpostcard"); session_start(); $img_encoded = base64_encode($image_data); mail($theiremail, "You Have A Christmas Postcard", "", "from: \"$yourname\" <$youremail>\r\n" ."Content-Type: multipart/mixed; boundary=\"------------15E3B1D587950C2CAADCBF93\" This is a multi-part message in MIME format. --------------15E3B1D587950C2CAADCBF93 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit $yourmessage --------------15E3B1D587950C2CAADCBF93 Content-Type: image/png; name=\"postcard10.png\" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename=\"postcard10.png\" $img_encoded --------------15E3B1D587950C2CAADCBF93-- "); ?>

« previous php.general (#78424) next »