PHPMailer by default prints out the errors which, beside other things, breaks services since they corrupt the output for example in JSON.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

recidive created an issue. See original summary.

recidive’s picture

Patch attached.

asrob’s picture

Status: Needs review » Reviewed & tested by the community

I successfully applied this patch and looks good to me therefore RTBC'ed!

Chris Matthews’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

The patch in #2 was RTBC'd 3 years ago, but no longer applies to 8.x-1.x-dev.

Checking patch smtp.module...
error: while searching for:
  $logger->info('Sending mail to: @to', array('@to' => $to));

  // Try to send e-mail. If it fails, set watchdog entry.
  if (!$mailer->Send()) {
    $logger->error('Error sending e-mail from @from to @to: @error_message', array('@from' => $from, '@to' => $to, '@error_message' => $mailer->ErrorInfo));
    return FALSE;
  }

error: patch failed: smtp.module:85
error: smtp.module: patch does not apply
Checking patch src/Plugin/Mail/SMTPMailSystem.php...
error: while searching for:
    $subject = $message['subject'];

    // Create a new PHPMailer object - autoloaded from registry.
    $mailer = new PHPMailer();

    // Turn on debugging, if requested.
    if ($this->smtpConfig->get('smtp_debugging') == 1) {

error: patch failed: src/Plugin/Mail/SMTPMailSystem.php:103
error: src/Plugin/Mail/SMTPMailSystem.php: patch does not apply
Chris Matthews’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
1.11 KB

Patch from HEAD

wundo’s picture

requeued for testing

wundo’s picture

The fix for the fail that is blocking this issue is in https://www.drupal.org/project/smtp/issues/3089199#comment-13318709

wundo’s picture

wundo’s picture

wundo’s picture

re queued for testing after fixing 8.x-1.x

  • wundo committed b71a9bd on 8.x-1.x authored by Chris Matthews
    Issue #2857716 by recidive, Chris Matthews, wundo, asrob: Make PHPMailer...
wundo’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.