- Issue created by @adamps
- π¬π§United Kingdom adamps
I wonder even if we should get rid of these functions entirely?? The equivalent was not possible under the old Drupal Core interface. If people want to adjust an email then they can use a hook.
- π¦π²Armenia alen simonyan
Alen Simonyan β made their first commit to this issueβs fork.
- π¦π²Armenia alen simonyan
How we can skip actual sending of email? I mean the case when I want to pass all the phases, createParams, build, preRender etc, besides actual sending.
- π¬π§United Kingdom adamps
AdamPS β changed the visibility of the branch 3351132-emphasis-correct-usage to hidden.
- π¦π²Armenia alen simonyan
I got an answer.
If this is the case you need to set
$email->setTransportDsn('null://null');
inpostRender()
function./** * {@inheritdoc} */ public function postRender(EmailInterface $email): void { if ($email->getSubType() == 'notifications') { // Prevent email sending. $email->setTransportDsn('null://null'); } }