0

I'm trying to figure out an issue that at least one customer has reported repeatedly.

I'm trying to get more details about exact mail clients, if some of these emails work and others don't etc. But until then, I'd love to hear theories – maybe someone recognises this format with square brackets for images and angled brackets for URLs.

We send a multipart email, both plaintext and HTML.

The user has received what appears to be a bastardised version of the HTML part:

[Name of our site]
Some text.

Unsubscribe<https://example.com/unsubscribe/abc123>
[https://example.com/image.jpg]<https://example.com/page>

Where the HTML part has something like (I've simplified):

<img alt= "Name of our site" src="https://example.com/logo.png" style="…">
<p>Some text.</p>
<p><a href="https://example.com/unsubscribe/abc123">Unsubscribe</a></p>
<p><a href="https://example.com/page"><img src="https://example.com/image.jpg" alt></a></p>

(The plaintext part is completely different and doesn't e.g. include image URLs at all.)

I'm curious about where this format comes from, showing e.g. an image as [alt text] or [image URL if there's no alt], and showing links as <url>. It's a bit hard to google…

Emails are generated by Ruby on Rails, sent via SendGrid. Recipient uses live.se which I believe corresponds to live.com and has been replaced by outlook.com. I believe the recipient uses Mail.app on an iPhone, but I'm not sure.

I've so far failed to reproduce it. When I send the email to myself (even to an outlook.com account), I don't see the issue, and the mail source (as viewed from the mail client) doesn't include anything like this format.

1 Answer 1

-1

It looks like your email does not have the correct syntax for the HTML in it. The browsers will try to interpret it. Different browsers will interpret it differently.

If you are sending an HTML email it has to have the correct syntax.

As an example, if you have this, where the error is forgetting to put a slash for the </option>.

<html>
<body>
<label for="cars">Choose a car:</label>

<select name="cars" id="cars">
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="mercedes">Mercedes<option>  <-------
  <option value="audi">Audi</option>
</select>
</body>
</html>

The browser will try and interpret it, depending on how the engine was written. In this case, both Chrome and Firefox will display a blank option.

3
  • Thank you. That's certainly a theory, but it seems unlikely that a bit of incorrect HTML would lead to it being rendered in this very specific, non-HTML-like way. If you could point to specific browsers/client you know to have this behaviour, or specific examples of incorrect (malformed? invalid?) HTML you know to lead to this kind of output, that would be helpful.
    – Henrik N
    Commented Aug 17, 2022 at 15:38
  • Have you looked at the complete HTML ? You could try and post it here. Commented Aug 17, 2022 at 23:46
  • Forgetting a closing tag as in your updated answer might result in quirky behaviour, but surely nothing like the entirely transformed output I showed. I’ve now also checked in a bunch of mail clients via Litmus - still not reproduced. Again, if you or someone else can point to a specific type of formatting issue or a specific client that would explain this specific transformed output, I will consider this a possible answer.
    – Henrik N
    Commented Aug 18, 2022 at 6:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.