From affc73598672fe8631f83a692cce8260831d5c29 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 30 May 2012 11:46:58 +0200 Subject: [PATCH] Minor - fix when adding custom headers --- main/inc/lib/mail.lib.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main/inc/lib/mail.lib.inc.php b/main/inc/lib/mail.lib.inc.php index e844b922e6..88c87a9371 100644 --- a/main/inc/lib/mail.lib.inc.php +++ b/main/inc/lib/mail.lib.inc.php @@ -179,6 +179,10 @@ function api_mail_html($recipient_name, $recipient_email, $subject, $message, $s break; } } + } else { + if (!empty($extra_headers)) { + $mail->AddCustomHeader($extra_headers); + } } // WordWrap the html body (phpMailer only fixes AltBody) FS#2988 @@ -187,6 +191,7 @@ function api_mail_html($recipient_name, $recipient_email, $subject, $message, $s // Send the mail message. if (!$mail->Send()) { //echo 'ERROR: mail not sent to '.$recipient_name.' ('.$recipient_email.') because of '.$mail->ErrorInfo.'
'; + error_log('ERROR: mail not sent to '.$recipient_name.' ('.$recipient_email.') because of '.$mail->ErrorInfo.'
'); return 0; }