Sunday, August 22, 2010

How to Send Email in Android ?

Intent sendIntent;

sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_SUBJECT,
"Test");
sendIntent.putExtra(Intent.EXTRA_TEXT,
"Hy Testing");
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"
+ file.getAbsolutePath()));
sendIntent.setType("image/jpeg");
startActivity(Intent.createChooser(sendIntent, "Send Mail"));

No comments:

Post a Comment