updated phpMailer-Class to version 5.1 (PHP5/PHP6), fixes #35

This commit is contained in:
Michael Kaufmann (d00p)
2010-03-03 08:51:13 +00:00
parent a0c557c405
commit a6909a8cec
9 changed files with 3224 additions and 3469 deletions

View File

@@ -209,28 +209,25 @@ if($db->num_rows($result) > 0)
continue;
}
//send mail with mailer class
$mail->From = $to;
$mail->FromName = $to;
$mail->Subject = $row['subject'];
$mail->Body = html_entity_decode($message);
$mail->AddAddress($from, $from);
$mail->AddCustomHeader('Precedence: bulk');
// set correct return path
$mail->Sender = $to;
if(!$mail->Send())
{
if($mail->ErrorInfo != '')
{
$mailerr_msg = $mail->ErrorInfo;
}
else
{
$mailerr_msg = $from;
}
$_mailerror = false;
try {
$mail->SetFrom($to, $to);
$mail->AddReplyTo($to, $to);
$mail->Subject = $row['subject'];
$mail->AltBody = $message;
$mail->MsgHTML(html_entity_decode($message));
$mail->AddAddress($from, $from);
$mail->AddCustomHeader('Precedence: bulk');
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error sending autoresponder mail: " . $mailerr_msg);
}