chirag04 / react-native-mail

A wrapper on top of MFMailComposeViewController from iOS and Mail Intent on android
MIT License
445 stars 249 forks source link

Android Limited HTML Email? #73

Open dereksweet opened 7 years ago

dereksweet commented 7 years ago

I seem to be having a problem getting a good HTML email sent out by android. It looks great on iOS, but it seems on Android that only the br tags are respected, all other text formatting and inline CSS styling is ignored.

Using a GMail account on both iOS and Android for delivery.

stnmonroe commented 6 years ago

I am having the same issue. Have you found a work-around?

dereksweet commented 6 years ago

No I don't believe I ever did, actually. I just made the plain text version look as nice as I could :(

bhave-abhay commented 5 years ago

For the record, the issue is still there, I could not get anything except a br be rendered as html on android mail client's email body

mistermoe commented 5 years ago

I think this is source of why html doesn't work on android. According to the mailto RFC only plain-text is supported. Unless android supports another way to communicate with mail clients other than mailto, i'm not too sure if it's even possible. I don't have much experience writing native android apps but i am very comfortable with java. I'm going to see if i can find an approach other than using mailto that allows passing along html that then gets rendered. I'll post my findings here

HTML support for iphone only works because the underlying native module is leveraging MFMailComposeViewController which itself directly supports the use of HTML. Source here. It's worth noting that this only works for the native mail app. Support for other mail apps (i.e. gmail) is dependent on whether the URL Scheme for that app is willing to accept html and render it

lattrellsapon commented 3 years ago

Hello, I can see that this issue is still open. Is there a fix for this?

Thanks.

gsieczkowski10clouds commented 3 years ago

It's not fixed. I think that Intent should use EXTRA_HTML_TEXT together with EXTRA_TEXT. Now it uses only second one so basically it has the same result regardless of isHtml value.

pinefirst commented 1 year ago

I am having the same issue. Have you found a work-around? Maybe it doesn't work in Android