code:
global $config;
$newline = "\n";
if (stristr(PHP_OS,"win")) {
$newline = "\r\n";
}
if (!$from) {
$headers .= "From: {$config['emailaddy']}$newline";
}
else {
$headers .= "FRom: $from$newline";
}
$headers .= "Content-Type: text/html; charset=Windows-1251$newline";
$headers .= "Content-Transfer-Encoding: 8bit$newline";
$headers .= "Sender: {$config['emailaddy']}$newline";
$headers .= "Reply-to: {$config['emailaddy']}$newline";
$headers .= "X-Mailer: UBB.threads$newline";
$headers .= "Return-Path: <{$config['emailaddy']}>$newline";
if ($htmlmail == "HTML") {
$headers .= "Content-Type: text/html; charset=Windows-1251$newline";
$headers .= "Content-Transfer-Encoding: 8bit$newline";
}
return $headers;