I can't figure out how to send an HTML formatted Email from React-Native. I have tried with both React-Native-Communications and React-Native-Mail but both cause the html tags to appear as text in the email body. I even set the isHTML flag to true in RN-mail and it did not help on Android (haven't tested iOS though). How can I do this?
3
-
<a href="mailto:[email protected]">Mail</a> en.wikipedia.org/wiki/Mailtofungusanthrax– fungusanthrax2017-03-24 16:11:44 +00:00Commented Mar 24, 2017 at 16:11
-
As far as Google and I know mailto doesn't support hmtl formatted body textGerharddc– Gerharddc2017-03-24 16:17:08 +00:00Commented Mar 24, 2017 at 16:17
-
Not sure if this is language-specific, but it can be done on the server-side using php's mail function as well.fungusanthrax– fungusanthrax2017-03-24 18:52:56 +00:00Commented Mar 24, 2017 at 18:52
Add a comment
|
1 Answer
I haven't used React-Native-Communications and React-Native-Mail (ones that you mentioned), but since React Native is also a node based framework, you can try using https://github.com/andris9/Nodemailer library. It sure sends html content in mails. and to help you get started, you can use this answer with example usage of this module. Even you can seperate it in a component of your own later on to maintain modularity. I hope it helped.
2 Comments
Gerharddc
Sorry, I didn't mean that I want to send the mail directly with the app but rather that I want to invoke the creation of a new mail in the default mail app so that the user can send it from his own address