mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-13 17:24:54 +02:00
Save mailer error messages to file (always)
Filename: mailer-error.log This will help debugging mail sending for new users
This commit is contained in:
@@ -878,7 +878,14 @@ function _mail($to, $subject, $body, $altBody = '', $add_html_tags = true)
|
||||
$mailer->AltBody = strip_tags(preg_replace('/<a(.*)href="([^"]*)"(.*)>/','$2', $body)) . "\n" . $signature_plain;
|
||||
}
|
||||
|
||||
return $mailer->Send();
|
||||
ob_start();
|
||||
if(!$mailer->Send()) {
|
||||
log_append('mailer-error.log', PHP_EOL . $mailer->ErrorInfo . PHP_EOL . ob_get_clean());
|
||||
return false;
|
||||
}
|
||||
|
||||
ob_end_clean();
|
||||
return true;
|
||||
}
|
||||
|
||||
function convert_bytes($size)
|
||||
|
Reference in New Issue
Block a user