0
Intent intent = new Intent(Intent.ACTION_SENDTO); // it's not ACTION_SEND

intent.setType("text/plain");

intent.putExtra(Intent.EXTRA_SUBJECT, "Subject of email");
intent.putExtra(Intent.EXTRA_TEXT, "Body of email");
intent.setData(Uri.parse("mailto:default@recipient.com")); // or just "mailto:" for blank
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // this will make such that when user returns to your app, your app is displayed, instead of the email app.
startActivity(intent);

this method calls built in email but i want to put email address and text entered mail messege by user is it possible to copy any one can give me solution

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

1 Answers1

0

I use this code to only select the emailing applications and push a subject, text and receiver:

Intent emailIntent = new Intent(Intent.ACTION_SENDTO, 
Uri.fromParts("mailto","your.email@example.com", null));
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Subject");
emailIntent.putExtra(Intent.EXTRA_TEXT, "Body of email");
startActivity(Intent.createChooser(emailIntent, "Send email..."));

if you don't want the body text/ subject you can just leave that line out.

Daan Seuntjens
  • 880
  • 1
  • 18
  • 37