Something like this:
Code:
<?php
$path = "path to the image file";
$fp = fopen($path, 'r');
do {
Â* $data = fread($fp, 8192); Â* Â* Â*
Â* if (strlen($data) == 0) break;
Â* Â* Â*$content .= $data;
} while (true);
$encoded_content = chunk_split(base64_encode($content));
$message .= $encoded_content . "\n";
$message .= "--" . $boundary . "\n";
$headers Â*= "From: \"You\"<you@yoursite.com>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/mixed; boundary=\"$boundary\"";
$sent = mail('somebody@domain.com', 'Email with attachment', $message, $headers);
print ($sent) ? 'Done!' : 'Error!';
?>
Edited:
Oh... now i see... you said embedded and not attachment :P
Ok, just define your
Content-Type as
text/html and in your message (html) give a normal link (URL) to the image... with the img tag.
Hope it helps