MORE: mail() attach png
| From: | jtjohnston | Date: | Sat, 10 Nov 2001 23:27:14 +0000 |
| Subject: | MORE: mail() attach png | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-74134@lists.php.net to get a copy of this message | ||
> ImagePNG($image);
> imagedestroy($image);
I tried adding headers, but am missing something. Can anyone help?
<?php
mail("jtjohnston@courrier.usherb.ca", "Test Image", "Test
message","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
--------------15E3B1D587950C2CAADCBF93
Content-Type: image/png;
name=\"postcard10.png\"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename=\"postcard10.png\"
$image
--------------15E3B1D587950C2CAADCBF93--
");
echo "mail sent";
?>