Home > Mobile >  Somehow the HTML content cannot be rendered in email
Somehow the HTML content cannot be rendered in email

Time:07-05

We use Python and REST API to fetch data from AWS EC2 to create a report, and then convert the data to an HTML table format and send the content out.

However, if there are lots of rows in the table. e.g. 200 rows, somehow some of the content in the received email cannot be rendered and displayed in text format, e.g. the hyperlink is not rendered and displayed as <a href="xxxxx">aaaaa", or <tr><td> is not rendered and displayed as <tr><td>, even the To Do text displayed as T o Do and so on.

But if I use smpt.gmail.com as the mail server, the content can be rendered successfully every time.

The same code but with a different server causes different results.

What should I do to make the result display normally?

CodePudding user response:

I found that the email cannot render correctly happens in Microsoft Outlook for MAC.

However, the same email in Microsoft Outlook for Windows 10 displayed correctly.

And as we have known, it also displays correctly in Microsoft Outlook for Mac by smtp.gmail.com but displays wrong with our own SMTP server.

So this may be an issue with the AD or operating system.

  • Related