Так поэтому и пишу, что Долго буду разбираться....
Но твой совет возьму на заметку!
-~{}~ 24.10.07 14:19:
Нашел в инете вот такой код... но видимо чего то не хватает и что с этим делать не знаю... ((((
фаил rs.php
require "rs_send.inc";
# Определяемся кому чего отправлять
$to="email@получателя";
# ОТПРАВЛЯЕМ
$file = "out/newtov.html";
$file_name = "newtov.html";
$attach=array();
$attach[]="out/slogan.gif|slogan.gif|image/gif";
$attach[]="out/kat_1.gif|kat_1.gif|image/gif";
$attach[]="out/kat_2.gif|kat_2.gif|image/gif";
$attach[]="out/kat_3.gif|kat_3.gif|image/gif";
sendmail($from, $to, $subject, $message, $file, $file_name, $attach);
exit;
?>
фаил rs_send.inc
********************************************
# Установки по умолчанию
$from = "От кого ";
$message = "Сообщение";
$subject = "Тема";
$attach=array();
# Фунуция отправки
function sendmail($from, $to, $subject, $message, $file, $file_name, $attach){
$headers = "";
$unique_sep = md5(uniqid(time()));
$filedata = implode(file($file), '');
$headers .= "From: $from\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/mixed; boundary="$unique_sep";\n";
$headers .= "charset="WINDOWS-1251"\n Content-Transfer-Encoding: binary\n\n";
$headers .= "--$unique_sep\n";
$headers .= "Content-Type: text/html; name="$file_name"\n";
$headers .= "Content-Transfer-Encoding: base64\n";
$headers .= "Content-Disposition: inline\n\n";
$headers .= chunk_split(base64_encode($filedata));
$headers .= "--$unique_sep\n";
if (isset($attach) and count($attach)>0){
$unique_sep1 = md5(uniqid(time()));
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/related; boundary="$unique_sep1";\n";
$headers .= "charset="WINDOWS-1251"\n Content-Transfer-Encoding: binary\n\n";
$headers .= "--$unique_sep1\n";
for ($x=0;$x $arr_attach=explode("|",$attach[$x]);
$file = $arr_attach[0];
$file_name = $arr_attach[1];
$contenttype = $arr_attach[2];
$filedata = implode(file($file), '');
$headers .= "Content-Type: $contenttype; name="$file_name"\n";
$headers .= "Content-Transfer-Encoding: base64\n";
$headers .= "Content-Disposition: attachment\n\n";
$headers .= chunk_split(base64_encode($filedata));
if ($x $headers .= "--$unique_sep1\n";
}else{
$headers .= "--$unique_sep1--\n";
}
}
}
$headers .= "--$unique_sep--\n";
mail($to, $subject, $message, $headers);
}
# Конец функции отправки
?>