Skip to content Skip to sidebar Skip to footer

Error When Embed Image In Mail Using Yii2

I want to embed images in my mail body and I follow the documentation on http://www.yiiframework.com/doc-2.0/guide-tutorial-mailing.html . My code in the controller looks like this

Solution 1:

Yii need the image path to be able to embed it, you should simply use a path instead of url :

'logo' => Yii::getAlias('@app/web/mail/images/logo.png');

Post a Comment for "Error When Embed Image In Mail Using Yii2"