$file_name1=$_SERVER["DOCUMENT_ROOT"]."/upload/iblock/6d4/1511.jpg";
$file_name2=$_SERVER["DOCUMENT_ROOT"]."/upload/iblock/2a6/1142.jpg";
$subj="Отправка изображения";
$bound="spravkaweb-1234";
$headers="From: \"Evgen\" <
[email protected]>\n";
$headers.="To:
[email protected]\n";
$headers.="Subject: $subj\n";
$headers.="Mime-Version: 1.0\n";
$headers.="Content-Type: multipart/alternative; boundary=\"$bound\"\n";
$body="–$bound\n";
$body.="Content-type: text/html; charset=\"windows-1251\"\n";
$body.="Content-Transfer-Encoding: 8bit\n\n";
$body.='<h3>Привет</h3>
<img src="cid:spravkaweb_img_1">
<img src="cid:spravkaweb_img_2">
';
$body.="\n\n–$bound\n";ф
$body.="Content-Type: image/jpeg; name=\"".basename($file_name2)."\"\n";
$body.="Content-Transfer-Encoding:base64\n";
$body.="Content-ID: <spravkaweb_img_2>\n\n";
$f2=fopen($file_name2,"rb");
$body.=base64_encode(fread($f2,filesize($file_name2)))."\n";
$body.="–$bound–\n";
$body.="Content-Type: image/jpeg; name=\"".basename($file_name1)."\"\n";
$body.="Content-Transfer-Encoding:base64\n";
$body.="Content-ID: <spravkaweb_img_1>\n\n";
$f=fopen($file_name1,"rb");
$body.=base64_encode(fread($f,filesize($file_name1)))."\n";
$body.="–$bound–\n\n";
//mail("
[email protected]", $subj, $body, $headers);