Forum Moderators: coopster
Also, you might want to look at some of PEARs library's for handling and sending email -- specifically mail_mime and mail. These are very nice, I might add, for sending emails of all kinds.
<?phprequire_once(CORE.'lib/templateMail.php');
function sendMail($data)
{
extract($data);$from = 'domain';
$reply_to = 'admin@domain.com';# headers
# -------
$headers = "From: $from\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
$headers .= "Content-Transfer-Encoding: 7bit\n";
$headers .= "Reply-To: $reply_to\n";
$headers .= "X-Mailer: PHP/".phpversion()."\n";
$headers .= "X-Posting-Client: ".getIp()."\n";
$headers .= "X-Sender: <admin@domain.com>\n";
$headers .= "Return-Path: <admin@domain.com>\n";
$headers .= "Errors-to : <admin@domain.com>\n";if ($priority)
{
$headers .= "X-Priority: 1\n";
$headers .= "X-MSMail-Priority: High\n";
}switch ($type)
{
case 'memo':
break;
default :
$template = templateMail($type);
eval("\$subject = \"$template[subject]\";");
eval("\$body = \"$template[body]\";");
break;
}return @mail($to_email, $subject, $body, $headers);
}
?>