Answer the question
In order to leave comments, you need to log in
How to work with email templates in phpmailer?
It seems to be an obvious problem, but I can not google anything sensible.
There is an html-template of the letter, and there is data that needs to be substituted into it when sending (for example, the addressee's name).
How to do it? In Yii2, for example, there is a method compose()
that does just that.
I thought it was swiftmailer's native method, but no.
All I googled are bikes based on str_replace.
Is there really no "out of the box" method? If not in PhpMailer, then in another library.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question