Commit b817bab2 authored by sun's avatar sun

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

parent df8b7317
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.
#1183820 by sun: Allow sending test mail without globally enabling PHPMailer.
#971172 by sun, Shaun Dychko: Clarify Google Apps support.
......@@ -360,15 +360,17 @@ class DrupalPHPMailer extends PHPMailer implements MailSystemInterface {
// Message is a safe t() string from DrupalPHPMailer::SetLanguage().
$output = $e->getMessage();
// Attempt to delimit summary from full message.
$output .= " \n";
$arguments = array();
// Append SMTP communication output.
if ($mail->drupalDebugOutput) {
if ($this->drupalDebugOutput) {
// 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 .= "<pre>\n@smtp_output\n</pre>";
$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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment