Home > OS >  <pre> tag ignored on Zoho Mail app for Android
<pre> tag ignored on Zoho Mail app for Android

Time:10-13

I built an HTML email with the following content.

<h1>
TT Railtrax Cron Services, Version 1.00
</h1>
<p>
Summary for 10/11/2021 4:00:07 AM
</p>
<pre>-------------------------------------------------------------------------------
[10/11/2021 4:00:01 AM][INFO] Starting Cron Services : TT Railtrax Cron Services, Version 1.00
[10/11/2021 4:00:05 AM][INFO] Downloaded 4 files
[10/11/2021 4:00:05 AM][INFO] Waybill discarded because of shipment type 'E' : Shipment ID: NS
[10/11/2021 4:00:05 AM][INFO] Waybill discarded because of shipment type 'E' : Shipment ID: NS
[10/11/2021 4:00:05 AM][INFO] Waybill discarded because of shipment type 'E' : Shipment ID: NS
[10/11/2021 4:00:05 AM][INFO] Waybill discarded because of shipment type 'E' : Shipment ID: NS
[10/11/2021 4:00:05 AM][INFO] Imported 0 417 files (0 records)
[10/11/2021 4:00:05 AM][INFO] Imported 0 CLM files (0 records)
[10/11/2021 4:00:07 AM][INFO] Sending 1 notification emails.
</pre>

And it looks as expected using my mail client, Zoho Mail.

enter image description here

However, when I view it on my Zoho Mail Android app on my mobile phone, the <pre> tag appears to be completely ignored.

enter image description here

Has anyone else dealt with this? Is Zoho Mail deliberately ignoring <pre> tags on mobile devices because they can prevent word wrapping? Does anyone know if other mails clients do the same thing?

CodePudding user response:

You might try replacing <pre> with <code> or <samp> just to see if they will display the content properly on mobile devices.

CodePudding user response:

So, I have no way to see the exact markup on my Android device. My best guess is that Zoho Mail is altering the HTML. You can also see that the Android version doesn't set the monospaced text either.

My workaround was to actually place <br /> tags within the <pre> element to force the line breaks. Although <pre> displays some raw markup, the <br /> tags are rendered as new lines.

It's not as nice as on my desktop, but at least each line starts on a new line.

  • Related