Tag Archives: intent

Send an Email from App with Android Intent

Send an Email from App with Android Intent

Intent emailIntent = new Intent(Intent.ACTION_SEND); 

// The intent does not have a URI, so declare the "text/plain" MIME type
emailIntent.setType("text/html");emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] {"david@google.com"}); // recipientsemail

Intent.putExtra(Intent.EXTRA_SUBJECT, "Email subject");
emailIntent.putExtra(Intent.EXTRA_TEXT, "Email message text...");
emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("content://path/to/email/attachment"));    

// You can also attach multiple items by passing an ArrayList of Uris
startActivity(emailIntent);Log.v("*** MainActivity ***","Intent method called");