I have an email document created and now I want to send a mail with params set.
$mail = new \Pimcore\Mail(); $mail->addTo($userEmail); $mail->setDocument('/Foresight/AccessRequestApproved'); $mail->setParams(["countryCode" => $countryCode, "userGivenName" => $userGivenName]); $mail->send();
How I can access these set parameters in the view (I am using php templating, not twig) and inside the linked controller’s action?
In the view the placeholders work but not the variables
- This works:
- This doesn’t
<?= $countryCode; ?>
Thanks a lot