Здравствуйте, Vlad.
> Дефолтовая кодировка windows-1251 у сервера и валится туда в ней же.
$tbl_koi="БВЧЗДЕЦЪЙКЛМНОПРТУФХЖИГЮЫЭШЩЯЬАСбвчздецъйклмнопртуфхжигюыэшщяьас";
$tbl_win="абвгдежзийклмнопрстуфхцчшщьыъэюяАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЫЪЭЮЯ";
$win_koi="/".$tbl_win."/".$tbl_koi."/";
$MAIL = '/usr/sbin/sendmail -t';
$message = <<END;
To: $to
From: $from
Subject: $subject
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 8bit
Bla-bla-bla
END
eval('$message =~ tr'.$win_koi);
open (MAIL, "| $MAIL") || die "Mail: $!";
print MAIL $message;
close MAIL;
С уважением, Андрей Новиков
------------------------------------------------------------
Всероссийский Клуб Вебмастеров http://www.webclub.ru/
По официальным вопросам пишите mailto:webclub@xxxxxxxxxx
=============================================================================
= Apache-Talk@xxxxxxxxxxxxx mailing list =
Mail "unsubscribe apache-talk" to majordomo@xxxxxxxxxxxxx if you want to quit.
= Archive avaliable at http://www.lexa.ru/apache-talk =
"Russian Apache" includes software developed
by the Apache Group for use in the Apache HTTP server project
(http://www.apache.org/) See
Apache LICENSE.
Copyright (C) 1995-2001 The Apache Group. All rights reserved.
Copyright (C) 1996 Dm. Kryukov; Copyright (C)
1997-2009 Alex Tutubalin. Design (C) 1998 Max Smolev.