Posted By

abwaters on 09/20/09


Tagged

email android intent


Versions (?)

Send email from Android using Intent


 / Published in: Java
 

  1. Intent i = new Intent(Intent.ACTION_SEND);
  2. //i.setType("text/plain"); //use this line for testing in the emulator
  3. i.setType("message/rfc822") ; // use from live device
  4. i.putExtra(Intent.EXTRA_EMAIL, new String[]{"[email protected]"});
  5. i.putExtra(Intent.EXTRA_SUBJECT,"subject goes here");
  6. i.putExtra(Intent.EXTRA_TEXT,"body goes here");
  7. startActivity(Intent.createChooser(i, "Select email application."));

Report this snippet  

You need to login to post a comment.