[代码] java代码
1
Intent i = new Intent(Intent.ACTION_SEND);
2
//i.setType("text/plain"); //模拟器请使用这行
3
i.setType("message/rfc822") ; // 真机上使用这行
4
i.putExtra(Intent.EXTRA_EMAIL, new String[]{"test@gmail.com"});
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."));