From 1ed90775876a62d5e507d631115f3cb30ffa236b Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Sun, 9 Feb 2014 19:51:31 -0500 Subject: [PATCH] Add in some sendmail parameters --- Sources/Subs-Post.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Sources/Subs-Post.php b/Sources/Subs-Post.php index 9c571f1..5649940 100644 --- a/Sources/Subs-Post.php +++ b/Sources/Subs-Post.php @@ -762,7 +762,11 @@ function sendmail($to, $subject, $message, $from = null, $message_id = null, $se foreach ($to_array as $to) { - if (!mail(strtr($to, array("\r" => '', "\n" => '')), $subject, $message, $headers)) + // xxx add in sendmail parameters here + $sendmail_from_addy = (empty($modSettings['mail_from']) ? $webmaster_email : $modSettings['mail_from']); + $sendmail_params = "-f $sendmail_from_addy -r $sendmail_from_addy"; + if (!mail(strtr($to, array("\r" => '', "\n" => '')), $subject, $message, $headers, $sendmail_params)) + //orig: if (!mail(strtr($to, array("\r" => '', "\n" => '')), $subject, $message, $headers)) { log_error(sprintf($txt['mail_send_unable'], $to)); $mail_result = false;