I want to send HTML content via email. I open gmail via intent and shows compose page using below code.
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setTy开发者_Go百科pe("text/html");
emailIntent.setPackage("com.google.android.gm");
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "subject here");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml("html <b>content</b>"));
startActivity(Intent.createChooser(emailIntent, "Email to Friend"));
But the problem with this is that, I cant send inline images. How can do that?
All you need:
- How can I attach an image file in email?
- Trying to attach a file from SD Card to email
精彩评论