1

I want to send an email from my android application which have HTML content and also an image as attachment.My searching results revealed that it is not possible to send an image using tag of HTML.How can i achieve this?.ie, I want content in HTML(These are some URLs) and send an image as attachment.

Thanks in Advance

Asha Soman
  • 35
  • 1
  • 5
  • 2
    Have you [done any research](http://stackoverflow.com/questions/2007540/how-to-send-html-email)? – Cat Aug 13 '12 at 05:23

1 Answers1

2
String path = Images.Media.insertImage(getContentResolver(), bmp,"title", null);
Uri screenshotUri = Uri.parse(path);
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
emailIntent
        .putExtra(android.content.Intent.EXTRA_EMAIL, emailAddresses);
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
emailIntent.putExtra(Intent.EXTRA_STREAM, screenshotUri);
emailIntent.setType("image/png");
startActivity(Intent.createChooser(emailIntent, "Send email using"));

Its usefull to Send mail

ckpatel
  • 1,926
  • 4
  • 18
  • 34