Answer the question
In order to leave comments, you need to log in
Yii2. How to fix the problem with sending a picture in the body of the letter?
Hello!
When sending a letter to gmail, the picture is attached to the letter as an attack, but is not displayed in the body of the letter.
On Yandex, everything is fine, the picture is displayed in the body of the letter, it is not in the attack.
How to fix on gmail?
Like this on Yandex (everything is correct)
And like this on Gmail (not correct, you need to fix it)
In Yii, I attach the picture like this:
<img src="<?=$message->embed($_SERVER['DOCUMENT_ROOT'].'/tmp/images/logo-color.svg')?>" alt="logo-color" style="width: 100%;">
Answer the question
In order to leave comments, you need to log in
It's not just an image, it's an svg. I think the point is that not all email clients eat svg. Try a simple jpg to rule this out or confirm.
But I'm 99.9% sure that it's the svg
:
https://css-tricks.com/a-guide-on-svg-support-in-email/
on old technologies. Tables, pictures without transparency, inline styles, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question