Add initialization of 'sendmail_from' PHP variable

This is a workaround for some systems that requires this variable to be set explicitly for sending emails (thanks to falcon for the issue)
This commit is contained in:
Fedor A. Fetisov 2013-09-24 23:26:39 +04:00
parent 7113ab3158
commit 36aa4f4b74

View File

@ -45,7 +45,13 @@ function mibew_mail($toaddr, $reply_to, $subject, $body, $link)
$body = preg_replace("/\n/", "\r\n", $body); $body = preg_replace("/\n/", "\r\n", $body);
log_notification($current_locale, "mail", $toaddr, $subject, $body, null, $link); log_notification($current_locale, "mail", $toaddr, $subject, $body, null, $link);
$old_from = ini_get('sendmail_from');
ini_set('sendmail_from', $mibew_mailbox);
@mail($toaddr, $real_subject, wordwrap(myiconv($mibew_encoding, $mail_encoding, $body), 70), $headers); @mail($toaddr, $real_subject, wordwrap(myiconv($mibew_encoding, $mail_encoding, $body), 70), $headers);
if (isset($old_from)) {
ini_set('sendmail_from', $old_from);
}
} }
function mibew_xmpp($toaddr, $subject, $text, $link) function mibew_xmpp($toaddr, $subject, $text, $link)