Send Mail with Image

How to send the image to the mail in android for these you can refer the following code
Getting image from Web

InputStream is = (InputStream) new URL("Image URL").getContent();
// storing image from stream
Drawable drawable = Drawable.createFromStream(is, "srcName");
// converting drawable object to Bitmap to store in content providers of Media
Bitmap bitmap = ((BitmapDrawable) drawable).getBitmap();
// Store image in Devise database to send image to mail
String path = Images.Media.insertImage(getContentResolver(), bitmap,"title", null);
Uri screenshotUri = Uri.parse(path);
final Intent emailIntent1 = new Intent( android.content.Intent.ACTION_SEND);
emailIntent1.putExtra(android.content.Intent.EXTRA_TEXT,"Enter the Text");
emailIntent1.putExtra(Intent.EXTRA_STREAM, screenshotUri);
startActivity(Intent.createChooser(emailIntent1, "Send email using"));

Need more help?

Hi there, was your problem or query resolved? If not & need more assistance, please do reach out to us at, we'll be more than delighted to help. Nanostuffs has 7+ years of extensive Salesforce & iOS/Android experience.
Holler Box