Skip to content
Snippets Groups Projects
Commit b817bab2 authored by Daniel Kudwien's avatar Daniel Kudwien
Browse files

Issue #1188610 by sun: Fixed bogus variable $mail in exception handling.

parent df8b7317
No related branches found
No related tags found
No related merge requests found
PHPMailer 7.x-3.x, xxxx-xx-xx PHPMailer 7.x-3.x, xxxx-xx-xx
----------------------------- -----------------------------
#1188610 by sun: Fixed bogus variable $mail in exception handling.
#1183836 by sun: Fixed more verbose log messages required in case of an error. #1183836 by sun: Fixed more verbose log messages required in case of an error.
#1183820 by sun: Allow sending test mail without globally enabling PHPMailer. #1183820 by sun: Allow sending test mail without globally enabling PHPMailer.
#971172 by sun, Shaun Dychko: Clarify Google Apps support. #971172 by sun, Shaun Dychko: Clarify Google Apps support.
......
...@@ -360,15 +360,17 @@ class DrupalPHPMailer extends PHPMailer implements MailSystemInterface { ...@@ -360,15 +360,17 @@ class DrupalPHPMailer extends PHPMailer implements MailSystemInterface {
// Message is a safe t() string from DrupalPHPMailer::SetLanguage(). // Message is a safe t() string from DrupalPHPMailer::SetLanguage().
$output = $e->getMessage(); $output = $e->getMessage();
// Attempt to delimit summary from full message.
$output .= " \n";
$arguments = array(); $arguments = array();
// Append SMTP communication output. // Append SMTP communication output.
if ($mail->drupalDebugOutput) { if ($this->drupalDebugOutput) {
// PHPMailer debug output contains HTML linebreaks. PRE is more readable. // PHPMailer debug output contains HTML linebreaks. PRE is more readable.
$mail->drupalDebugOutput = str_replace('<br />', '', $mail->drupalDebugOutput); $this->drupalDebugOutput = str_replace('<br />', '', $this->drupalDebugOutput);
$output .= '<p><strong>Server response:</strong></p>'; $output .= '<p><strong>Server response:</strong></p>';
$output .= "<pre>\n@smtp_output\n</pre>"; $output .= "<pre>\n@smtp_output\n</pre>";
$arguments += array( $arguments += array(
'@smtp_output' => $mail->drupalDebugOutput, '@smtp_output' => $this->drupalDebugOutput,
); );
} }
// We need to log the message in order to be able to debug why the server // We need to log the message in order to be able to debug why the server
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment