-1

RESOLVED: issue caused by HTML sanitizer

I'm creating an email template in JSON and I have an underlined word, e.g:

<ul><li><u style=\"text-decoration: underline;\"> Date:</u> Post must be shared on Instagram within one week of receiving your product</li></ul>

When I send myself my template and receive it in Gmail, the underlines are gone. There is no text decoration whatsoever. But my bolded text (using the tag) works great.

****NOTE: I tried adding inline-styling as suggested, but this does not work. I should also mention this text is in a list, so it has a parent li tag. Not sure why this would make a difference.

Has anyone run into this? I didn't see much on it while googling, which makes me wonder if there is a workaround.

2 Answers2

1

Ok, I figured out what was happening, and it's non-gmail related. We're using an HTML sanitizer on the back end, and the tag was not included. Once I explicitly added it, my email sent without issue. Thank you to everyone who took a look.

  • 1
    Just a tip that saved me hours, you can right click->inspect element on Gmail in order to see what the body of the received e-mail looks like (to check if tags/styles are missing) – LS_ Nov 08 '17 at 15:40
  • 1
    Thanks! This is very helpful. –  Nov 08 '17 at 15:40
-1

You could add custom styling: <u style="text-decoration: underline;"></u>

Savado
  • 557
  • 1
  • 3
  • 18