6

I am using html to send email. Due to the blocking of images by most providers, I'm using box-shadow to draw the image I need. However, in the browser appears normal, but in the email nothing appears. Am I doing something wrong? Any alternative?

</head>
<body style="height: 100%;width: 100%;">
<div class="pixels" style="border-radius: 0;display: inline-block;width: 1px;height: 1px;box-shadow: 0px 0px rgba(228,232,233,1),0px 1px.......;"><p> teste</p>
</div></body>
</html>
Mylon
  • 115
  • 1
  • 2
  • 8
  • Please include the full style tag. You've got `........` in there so it's impossible for us to test your code and make suggestions. – Brad Johnson Jul 11 '18 at 18:46
  • Exceeding the character limit, so it was not possible to enter the complete code. – Mylon Jul 11 '18 at 19:05

2 Answers2

5

A lot of providers don't support box-shadow. List here

gabriella-varga
  • 371
  • 2
  • 4
  • 15
  • Any alternative to draw image? – Mylon Jul 11 '18 at 18:59
  • You could base-64 encode your image and embed it in the email like this: https://hastebin.com/eruluhibaj.xml – Brad Johnson Jul 11 '18 at 19:03
  • Checking again, base64 might not be universally supported. This thread has alternatives: https://stackoverflow.com/questions/9110091/base64-encoded-images-in-email-signatures – Brad Johnson Jul 11 '18 at 19:05
  • True, I had tested the base64 image and it still did not work, the recipient anyway still needs to authorize the image to display. I will test the embedded image and post the result here. I thank you for your attention. – Mylon Jul 11 '18 at 19:13
0

It worked better than converting the image to base64. For some reason, some base64 images appeared binary code, and only appeared when you clicked "view full message" (in gmail). Using the inline image this problem has been solved. Thanks a lot for the help. I no longer knew what to do, I did not think that possibility. I had tried including, as explained at the beginning, using css (codepen.io/emad_elsaid/full/bCaLE), but as informed, you can not use box-shadow in emails. Thankful.

Mylon
  • 115
  • 1
  • 2
  • 8
  • This is sort off a longer way to do it, you can create more columns with different color shades to `mimic` shadow. Its a lot of work and you email might bloat in size but thats the only i see it working. So if your email is small in size, you can attempt this. – Syfer Jul 12 '18 at 01:45