Allow email entities to be saved by EmailHandler::sendEmail()

Created on 20 April 2024, 7 months ago
Updated 4 May 2024, 7 months ago

Problem/Motivation

In the past, the EmailHandler::sendEmail() method automatically saved email entities, but I removed this as part of the upgrade to version 3.0.0. I removed it to allow the flexibility to not save emails if you didn't want to. However, in practice, I'm finding it annoying to have to write code to save the email entities manually after sending. This is especially true now that sendEmail() returns an array of emails, so you have to loop through them and save every time.

Proposed resolution

I want to add an optional parameter to sendEmail() to save the email entities.

User interface changes

None. This is related to programmatic sending only.

API changes

The new parameter will be defaulted to false, so it won't affect any existing code that is expecting the current behavior.

✨ Feature request
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States zengenuity

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024