1

I'm working on a logic which sends a mail according to the form submission. In that form I have a rich text editor which is created using summernote.

added image shown in text editor

now when I submit the form, it submit the base64 encoded image to server side correctly. Please find the part of the submitted content below,

<p>test</p><p><img src="data:image/jpeg;base64,/9j/4AAQSkZJRg...

However, After receiving the mail renders in gmail as a byte array like below,

enter image description here

when I inspect the element I can see a tags like below,

enter image description here

I try to fix the issue by unescapeHtml the body in the server-side but no luck on that. Whats I'm doing wrong here? how can I fix this please help?

tk_
  • 16,415
  • 8
  • 80
  • 90
  • 1
    This might very well have to do with how gmail renders emails. Have you tried any other email clients? Regardless, you might be fresh out of luck with that approach anyway, as a lot of email clients do not support the image/data URI to render images: https://www.campaignmonitor.com/blog/how-to/2008/08/embedding-images-in-email/ – yinken Dec 26 '17 at 22:31
  • 1
    Please also see the discussion here on SO, it's probably more up to date: https://stackoverflow.com/questions/6070196/what-is-data-uri-support-like-in-major-email-client-software – yinken Dec 26 '17 at 22:38
  • 1
    Maybe related to this: https://support.google.com/mail/forum/AAAAK7un8RUwBe0CMGeBLA/?hl=en&msgid=aYfnFglYf1EJ&gpf=d/msg/gmail/wBe0CMGeBLA/aYfnFglYf1EJ – Cymen Dec 03 '20 at 06:30

0 Answers0