Problem/Motivation

The update/status_notify email can't be sent.

I installed this module and symfony_mailer_bc and noticed that update notification mails are not sent anymore. After some debugging it seems the problematic code lines are:
Emails without a To-Header are skipped in UpdateEmailBuilder.
The UpdateEmailBuilder has a weight of 300, inherited by EmailbuilderBase.
The ToEmailAdjuster has a weight of 400, inherited by EmailAdjusterBase.

This means i can configure a To-Header all i want, it won't get to the ToEmailAdjuster because the UpdateEmailbuilder throws a SkipMailException.

Proposed resolution

Remove the line throwing the SkipMailException. Shouldn't a missing To-Header be caught somewhere else?

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tgauges created an issue. See original summary.

tgauges’s picture

Assigned: tgauges » Unassigned
Status: Active » Needs review
adamps’s picture

Status: Needs review » Needs work

Great thanks for the issue and patch.

Shouldn't a missing To-Header be caught somewhere else?

OK but where😃. A site is allowed to have no 'To' address - this is how to disable the notifications. With this patch I think there would be an uncaught exception every time there is an attempt to send an update email.

I propose either: move the check to preRender() or override the default weights.

tgauges’s picture

Assigned: Unassigned » tgauges

override the default weights

I tried that and it caused the placeholders in the email to not be substituted.

move the check to preRender()

This is probably a valid solution.

A site is allowed to have no 'To' address - this is how to disable the notifications.

Is this only true for the update notification email? Otherwise a check in the ToEmailAdjuster would make this true for every email. But I guess in most cases a missing To-Header should be an uncaught exception. I will move the check to preRender() for now.

tgauges’s picture

Assigned: tgauges » Unassigned
Status: Needs work » Needs review
adamps’s picture

Status: Needs review » Needs work

But I guess in most cases a missing To-Header should be an uncaught exception.

Exactly. The update notification is a special case.

The patch looks good. I can commit it if you can add a comment to fix the coding standard message.

tgauges’s picture

Status: Needs work » Needs review

  • AdamPS committed 013bbb6 on 1.x authored by tgauges
    Issue #3285123 by tgauges: UpdateEmailBuilder requires To-Header to be...
adamps’s picture

Status: Needs review » Fixed

Great thanks

Status: Fixed » Closed (fixed)

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