Android Uncategorized

Sending email from Android

Sending an email is a very basic functionality (for some applications anyway). Android makes it very easy to do this. All you have to do is create a new intent, setup the content of the email and send it. 

Intent in = new Intent(Intent.ACTION_SEND); 
in.putExtra(Intent.EXTRA_TEXT, “this is the body of the email”); 
in.putExtra(Intent.EXTRA_SUBJECT, “Subject”); 
startActivity(Intent.createChooser(in, “Title:”));