Skip to content

[Mailer] Signing email is not working with templated email #42407

@kriskoch

Description

@kriskoch

Hello,
I am using the templated Email, and if I try to sign the message with DKIM, I receive the error 'A message must have a text or an HTML part or attachments.'

It seems like BodyRenderer isnt called until you send. Is there an event listener or something I need to tap into to sign it after the bodyrenderer is called?
If so then the documentation should be updated as I dont see anything on there.

Here is an example:

    $email = (new TemplatedEmail())
            ->to(new Address('example@example.org', 'Mr. Example' ))
            ->from(new Address('example@example.org', 'Ms. Example'))
            ->subject('Test Signed Email')
            ->htmlTemplate('email-templates/test.html.twig');


        $signer = new DkimSigner('file://'.$keyFile, $domain, $selector);
        $signed = $signer->sign($email);
        $mailer->send($signed);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy