How to send HTML mail using Android intent

2019-02-26 06:04发布

final Intent shareIntent= new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:"));
shareIntent.putExtra(Intent.EXTRA_SUBJECT, "The Subject");
shareIntent.putExtra(
Intent.EXTRA_TEXT,
Html.fromHtml(new StringBuilder()
    .append("<p><b>Some Content</b></p>")
    .append("<small><p>More content</p></small>")
    .toString())
);

Even I have pasted this code from a solved question(How to send HTML email). Still not working in my case.

1条回答
虎瘦雄心在
2楼-- · 2019-02-26 06:29

It looks like a regression in the GMail app. It was working fine before and now it's not working anymore. It might be a bug or it might have been disabled on purpose for security reasons... Anyway I don't think you'll be able to fix this on your side

查看更多
登录 后发表回答