Sending E-Mail in Android using Intent

by Sasikumar 2014-02-26 17:20:50

To send email from android app using intent, use the following code,
Intent mail = new Intent(Intent.ACTION_SEND);
mail.setType("text/plain"); // type of mail
mail.putExtra(Intent.EXTRA_EMAIL, new String[] "email@mail.com"}); // email address of the receiver
mail.putExtra(Intent.EXTRA_SUBJECT, "Subject Of E-Mail"); // Subject of the email
mail.putExtra(Intent.EXTRA_TEXT, "Content of the email to be sent"); // Email content
this.startActivity(Intent.createChooser(mail, "title of mail"));

this method helps in sending email using the default mail application of the android device using the applications intent.
812
like
0
dislike
0
mail
flag

You must LOGIN to add comments