B
B
belyakov_av2019-10-25 12:46:24
Email
belyakov_av, 2019-10-25 12:46:24

Yii2 sending email. Can't insert a .png image into the email body?

$res=Yii::$app->mailer->compose('layouts/message_info', ['text' => $text,'logo' => Yii::getAlias('@img').'/logo. jpg']);
I pass the path to the image into the view and in the form:
use yii\swiftmailer\Message;
$message = new Message;

I insert it, but the letter comes with an empty tag
. If the $logo variable is printed, then - string (48) "cid: [email protected]"
Tell me what I'm wrong

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