Changeset:
8fd4e3906c36
https://sourceforge.net/p/mrbs/hg-code/ci/8fd4e3906c36f633e29e1dbc84cc4b7d42634de1
Author:
Campbell Morrison <[email protected]>
Date:
Fri Oct 16 16:16:50 2015 +0100
Log message:
(1) Changed the mailing code so that when $mail_settings['disabled'] is set it
carries on until the very last moment preparing to send mail - useful for
getting the maximum amount of debug information
(2) Flushed output when debug output is being sent to the browser (see SF
Support Requests #799)
diffstat:
web/functions_mail.inc | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diffs (41 lines):
diff -r abde918d404f -r 8fd4e3906c36 web/functions_mail.inc
--- a/web/functions_mail.inc Wed Oct 14 20:24:10 2015 +0100
+++ b/web/functions_mail.inc Fri Oct 16 16:16:50 2015 +0100
@@ -1104,6 +1104,8 @@
else // anything else goes to the browser
{
echo htmlspecialchars($full_message) . "<br>\n";
+ ob_flush();
+ flush();
}
}
@@ -1120,13 +1122,6 @@
global $mail_settings, $sendmail_settings, $smtp_settings, $enable_periods;
- // Don't do aything if mail has been disabled. Useful for testing MRBS
without
- // sending emails to those who don't want them
- if ($mail_settings['disabled'])
- {
- return;
- }
-
$mail = new PHPMailer;
mail_debug("Preparing to send email ...");
@@ -1344,6 +1339,14 @@
$mail->set('MIMEBody', $mime['body']);
mail_debug("Using backend '" . $mail_settings['admin_backend'] . "'");
mail_debug("Recipients: '$recipients'");
+
+ // Don't do aything if mail has been disabled. Useful for testing MRBS
without
+ // sending emails to those who don't want them
+ if ($mail_settings['disabled'])
+ {
+ return true;
+ }
+
if ($mail->postSend())
{
mail_debug('Email sent successfully');
------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits