Problem/Motivation

The backward compatibility MailManagerReplacement::mail() function always sends emails, even if the $send variable is set to FALSE. It should only send when $send = TRUE.

Steps to reproduce

I'm seeing this in Easy Email module. If you use the Easy Email Overrides sub-module, you can create a replacement email for the password recovery email. When used with Swift Mailer, the override works correctly, but with Symfony Mailer both emails are sent.

Proposed resolution

Patch attached.

Remaining tasks

Review patch.

User interface changes

None.

API changes

I think there should be none, however perhaps there is other code relying on the current behavior of this function.

Data model changes

None.

Comments

zengenuity created an issue. See original summary.

zengenuity’s picture

Status: Active » Needs review
StatusFileSize
new594 bytes
adamps’s picture

Status: Needs review » Needs work

Good idea thanks.

We should probably also return the correct value of 'send'

return ['result' => $result, 'send' => $send];
zengenuity’s picture

Status: Needs work » Needs review
StatusFileSize
new652 bytes

This patch also updates the return value.

  • AdamPS committed a7b0e6b on 1.x authored by zengenuity
    Issue #3269320 by zengenuity, AdamPS: MailManagerReplacement should...
adamps’s picture

Status: Needs review » Fixed

Thanks

Status: Fixed » Closed (fixed)

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