Add in some sendmail parameters

This commit is contained in:
Travis Burtrum 2014-02-09 19:51:31 -05:00
parent b3065423df
commit 1ed9077587

View File

@ -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;