Yep, it was *very* much discussed last time :)

first need to prepare your image to meet the base 64
and chunked standards:

$content = chunk_split ( base64_encode ( $your_image ) );

then you need something like this in the additional
header info of the php mail function:

$boundary = 'NEXT_PART';

$head = "Content-Type: multipart/mixed; boundary='$boundary'\n";
$head .= "Mime-Version: 1.0\n";

then in the message:

$message = "--$boundary\n";
$message .= "Content-Type: image/jpeg; name='my_image.jpg'\n";
$message .= "Content-Transfer-Encoding: base64\n";
$message .= "Content-Disposition: attachment\n\n";

$message = $content;

That's all! and it works! This way you can include html content too,
changing the content-type.

hope it helps.
Daniel BI


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to