S
S
Stanislav2016-12-08 20:41:52
Yii
Stanislav, 2016-12-08 20:41:52

How can I see the layout of a letter without sending it?

I would like to make a letter layout using the standard Yii2 template (mail/layout/...).
Is there any way to make a "preview" of what will be sent to the user's mail?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2016-12-08
@Stasgar

Good evening.
In the configuration file, in the components section

'mailer' => [
            'useFileTransport' => true,
        ],

Letters will be sent to runtime/mail, opened by any mail client

M
melnikov_m, 2016-12-08
@melnikov_m

Make a condition, if this is a development server, then all letters should go to the admin, and not to the user. Then you will be able to see all emails.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question