Android - How do I create an email body from a fil

2019-09-05 21:43发布

问题:

I have looked and found lots of great answers on how to load html into a body of an email Intent, but couldn't find how to load a file that contain css and html. I have a program that shows a webview where I display the file using:

webView.loadUrl("file://" + htmlManager.htmlFilePath(HtmlManager.myHtmlFile));

I have the email loading html using

Uri data = Uri.parse("mailto:?subject=" + subject + "&body=" + Html.fromHtml(htmlString));

but can I use the same file I used for the loadUrl for the body of the email?

回答1:

According to this site css is not able to be rendered in android email bodies

http://www.campaignmonitor.com/css/