no line breaks in mail body on Kindle Fire mail popup

Hi,

If I build a mail “body” with text that has newlines, like “foo\nfum”, it displays as two lines in a mail popup on iOS and on most Androids … but not on a Kindle Fire.  There, it (and “foo\n\nfum”) appear as “foo fum”

(i.e., the line breaks (newlines) are being ignored on the Kindle Fire.)

I’m about to implement a workaround: use “html” style email if I’m on kindle (I’d emit: “foo<br>fum”),

but I was wondering if anyone had found a better/simpler solution.

https://forums.coronalabs.com/topic/57025-sending-an-email-from-corona/

had this problem some years ago, but apparently found no solution.

I’m doing:

&nbsp;&nbsp; &nbsp; build\_sabout (true)&nbsp; -- 20 lines of text with newlines (\n) separating them &nbsp;&nbsp; &nbsp; local options = { &nbsp; &nbsp; &nbsp; &nbsp; to = "sieler@allegro.com", &nbsp; &nbsp; &nbsp; &nbsp; subject = "photolinx info", &nbsp; &nbsp; &nbsp; &nbsp; body = sabout, &nbsp; &nbsp; &nbsp; &nbsp; listener = bh\_mail\_event, &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; rslt = native.showPopup ("mail", options)

thanks,

Stan

What about \r (carriage return).  Does that work?  

Interesting question, rg …

Unfortunately, no.

I can confirm that, as one would expect, setting isBodyHtml, and using “<br>” where I’d have used “\n” works fine.

thanks,

Stan

Bear in mind that Amazon uses the open source version of Android to build their Kindle Fire OS. They likely have a bug if they are not handling plain text messages correctly. You could also try \m\r which is a Windows new line combination or you could also try putting in actual string.char(10) in case they simply are not parsing the \r sequence.

But if you’re sending it, there isn’t much of a reason to not use HTML. Almost all email clients can handle it today.

Rob

What about \r (carriage return).  Does that work?  

Interesting question, rg …

Unfortunately, no.

I can confirm that, as one would expect, setting isBodyHtml, and using “<br>” where I’d have used “\n” works fine.

thanks,

Stan

Bear in mind that Amazon uses the open source version of Android to build their Kindle Fire OS. They likely have a bug if they are not handling plain text messages correctly. You could also try \m\r which is a Windows new line combination or you could also try putting in actual string.char(10) in case they simply are not parsing the \r sequence.

But if you’re sending it, there isn’t much of a reason to not use HTML. Almost all email clients can handle it today.

Rob