我正在尝试找出 Android 中通过 Intent 发送多部分电子邮件的最简洁方法。该电子邮件应该包括一个纯文本部分和一个 HTML 部分。
谢谢。
最佳答案
String mailBody="Hello. I think you’d really enjoy this:"+
"<a href='www.google.com/'> Search eEngine </a>"+
"from Books"+"<br/><br/>";
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("text/html");
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Search eEngine ");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,Html.fromHtml(mailBody));
startActivity(Intent.createChooser(emailIntent, "Send mail..."));
关于android - 如何在 Android 中发送包含纯文本和 HTML 的多部分电子邮件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8133948/