Письмо с помощью pear библиотеки с вложением отправляется на локальный MDaemon. В пхп ошибки не выдает а в почтовый сервер приходит только текстовая часть. Как настроить прикрепления в данном сервере???
а вот функция пхп для отправки:
function send_message($to, $cc, $subject, $message, $array_file, $array_type)
{
include (\'Mail.php\');
include (\'Mail/mime.php\');
$n = count($array_file);
$message1 = new Mail_mime("\\r\\n");
$message1->setTXTBody($message);
for ($i=1; $i<=$n; $i++)
{
$name = $array_file[$i-1];
$imgfile = \'img/\'.$name; // echo $imgfile;
$message1->addHTMLImage ($imgfile, $array_type[$i-1], $imgfile, true);
}
$body = $message1->get();
$hdarray = array(\'From\' => \'giperborey@giperborey\',
\'Subject\' => \'Ïðîâåðêà\');
$hdrs = $message1->headers($hdarray);
$sender =& Mail::factory(\'mail\');
if ($sender->send(\'goth@giperborey\', $hdrs, $body)) { echo "Ïèñüìî îòïðàâëåíî"; return true;}
}