mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-01 05:44:41 +03:00
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:
parent
35cd7c6e67
commit
f739935096
@ -28,7 +28,12 @@ function mibew_mail($toaddr, $reply_to, $subject, $body)
|
|||||||
|
|
||||||
$body = preg_replace("/\n/", "\r\n", $body);
|
$body = preg_replace("/\n/", "\r\n", $body);
|
||||||
|
|
||||||
|
$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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue
Block a user