简体   繁体   中英

Sending html text in an email

I'd like users to be able to send emails from my app and the client would like the message body to be html-formatted. They look nicer and the message includes a rather ugly url that would be better placed inside an anchor tag.

I've seen some older queries on the web asking how to do this but have not been able to find a definitive answer.

Is it possible to use an Intent.ACTION_SEND (or some other method) to send an email pre-set with an html-formatted message body?

Yes, take a look at this post: http://davanum.wordpress.com/2007/12/22/android-send-email-via-gmail-actually-via-smtp/

You would then just change line 52 from text/plain to text/html .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM