Closed
Description
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);