J
J
JohnDaniels2018-07-03 18:14:14
PHP
JohnDaniels, 2018-07-03 18:14:14

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 question

Ask a Question

731 491 924 answers to any question