hello
been reading up on MIME and have the following code, was just wondering how do I put the image in?
The following code basically does this, sets up a MIME type email and creates a multipart/mixed bounday, the first part adds the html text but the second part is suppose to add the image.
But the image does not get sent as an attachment / or inline (have tried both) why is that?
When you say content-type:image/gif;name:url/images/imagename.gif
does name refer to the url of the image too?
// set the header information
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type : multipart/mixed;boundary=DOMAIN-1886\r\n";
// first boundary starts here - normal text
$headers .= "--DOMAIN-1886\r\n";
$headers .= "Content-Type:text/html\r\n";
$headers .= "Content-Transfer-Encoding:7bit\r\n";
$headers .= "$message\r\n";
// second boundary start here - image
$headers .= "--DOMAIN-1886\r\n";
$headers .= "Content-Type:image/gif;name='$image'\r\n";
$headers .= "Content-Transfer-Encoding:base64\r\n";
$headers .= "Content-Disposition:inline\r\n";
$headers .= "--DOMAIN-1886--\r\n";
mail($to,$re,"",$headers);