I know how to send an e-mail with SwiftMailer using yii2 and non-yii2 classes. I have also used non-yii2 classes to sign the e-mail with a DKIM signature. However, I am struggling with doing this within Yii2.
I’m struggling with how to get proper SwiftMailer signing class included and how to integrate it into the code above.
If this is not possible, I can use my non-yii2 code to create a signed e-mail, but how do I get the e-mail body from the view file merged with the parameters the same way mailer->compose($view, $params) does?
I’m unsure that is possible since I’m on a hosted server, but I can check into it. However, since I can already do it in straight PHP, I thought it would be an easy step to do it within Yii2. Might be mistaken. If it is possible, I’d still appreciate help.
But how is $message defined? I would need a full code sample to accomplish what I need. I need to create the signer, message, get the message from the mail view file, merge with the needed data parameters, address and send it.
I can do all this in basic PHP and some in Yii2, but not all of it in Yii2.