send mail using intent in android

send mail using intent in android

              An intent is an abstract description of an operation to be performed. It can be used with startActivity to launch an ActivitybroadcastIntent to send it to any interested BroadcastReceiver components, and startService(Intent) or bindService(Intent, ServiceConnection, int) to communicate with a background Service.
                  An Intent provides a facility for performing late runtime binding between the code in different applications. Its most significant use is in the launching of activities, where it can be thought of as the glue between activities. It is basically a passive data structure holding an abstract description of an action to be performed.

Here I have added coding to send email using intent.

It’s a simple step to send email from intent.

1. You can add To, Subject, Cc, and Text to the mail.

public class send_mail extends Activity
public void onCreate(Bundle savedInstanceState)
btn_mail.setOnClickListener(new OnClickListener()

public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent = new Intent(Intent.ACTION_SEND);
intent.putExtra(Intent.EXTRA_EMAIL, "");
intent.putExtra(Intent.EXTRA_SUBJECT, "");
intent.putExtra(Intent.EXTRA_TEXT,"" );
try {
} catch (android.content.ActivityNotFoundException ex) {
"There are no email clients installed.",

Leave a Reply

Your email address will not be published. Required fields are marked *