Answer the question
In order to leave comments, you need to log in
Yii2 Swiftmailer - how to pass a parameter to email layout?
It is necessary to send letters with different text, but in one common layout. In the layout, at the very beginning, you need to write a greeting to the user, like "Hello <?= $user_name ?>", so that this greeting would be displayed in each letter. How in yii2, in swiftmailer, when sending a letter, it is possible to pass parameters in the layout?
Answer the question
In order to leave comments, you need to log in
In order to pass a parameter to the layout, you need to do the following:
You can read more about other nuances of working with Swiftmailer here .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question