Problem/Motivation

\Drupal\symfony_mailer\EmailFactoryInterface has @return \Drupal\symfony_mailer\EmailInterface but \Drupal\symfony_mailer\EmailFactory::sendTypedEmail and \Drupal\symfony_mailer\EmailFactory::sendEntityEmail return a boolean.

Steps to reproduce

Proposed resolution

Unsure -- I think returning a boolean makes sense here but is @return \Drupal\symfony_mailer\EmailInterface preferred?

Remaining tasks

Determine desired return type and create a patch.

User interface changes

API changes

Data model changes

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

wells created an issue. See original summary.

adamps’s picture

Title: sendTypedEmail and sendEntityEmail return bool instead of EmailInterface » Wrong return type for sendTypedEmail() and sendEntityEmail()

Thanks for the report.

I think sometimes we might need EmailInterface, sometimes bool. There's no way to get from bool back to EmailInterface. Therefore I propose we keep EmailInterface. After #3337359: Add function to get email error message we can get back to the bool.

wells’s picture

Status: Active » Needs review

Make sense. MR!41 switches the return to the email interface.

  • AdamPS committed 5777e709 on 1.x authored by wells
    Issue #3338383 by wells: Wrong return type for sendTypedEmail() and...
adamps’s picture

Status: Needs review » Fixed

Thanks

Status: Fixed » Closed (fixed)

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