//系统邮件系统的动作为android.content.Intent.ACTION_SEND
Intent email = new Intent(android.content.Intent.ACTION_SEND);
email.setType("plain/text");
emailReciver = new String[]{"zhouyongyang122@gmail.com", "421134693@qq.com"};
emailSubject = "你有一条短信";
emailBody = sb.toString();

//设置邮件默认地址
email.putExtra(android.content.Intent.EXTRA_EMAIL, emailReciver);
//设置邮件默认标题
email.putExtra(android.content.Intent.EXTRA_SUBJECT, emailSubject);
//设置要默认发送的内容
email.putExtra(android.content.Intent.EXTRA_TEXT, emailBody);
//调用系统的邮件系统
startActivity(Intent.createChooser(email, "请选择邮件发送软件"));

 

带附件:

Intent returnIt = new Intent(Intent.ACTION_SEND);

       String[] tos = { "wangmeng@gmail.com" }; //send to someone

       String[] ccs = { "tongyue@gmail.com" };  //Carbon Copy to someone

       returnIt.putExtra(Intent.EXTRA_EMAIL, tos);

       returnIt.putExtra(Intent.EXTRA_CC, ccs);

       returnIt.putExtra(Intent.EXTRA_TEXT, "body");

       returnIt.putExtra(Intent.EXTRA_SUBJECT, "subject");

Uri uri = Uri.parse("file:///sdcard/mysong.mp3");

returnIt.putExtra(Intent.EXTRA_STREAM, uri);

returnIt.setType("audio/mp3");  //use this format no matter what your attachment type is 

returnIt.setType("message/rfc882");

Intent.createChooser(returnIt, "Choose Email Client");

startActivity(returnIt);

更多相关文章

  1. 为什么要在 Windows 10 系统上运行 Android 应用程序?
  2. Android 修改系统屏幕亮度及监听
  3. Android系统架构解析
  4. Google工程师解析Android系统架构
  5. Android灭亡论之Firefox OS操作系统出现
  6. Android调用系统相机和图库

随机推荐

  1. android使用c语言编程
  2. Android 之 四大组件、六大布局、五大存
  3. 【原创】删除Android预装软件包,…
  4. Android Re-installation failed解决方法
  5. Android程序内存管理必读
  6. Android 版本 相关参数修改(SpreadTrum)
  7. Android数据持久化——五种方式
  8. android从不同的layout添加tab页内容_tab
  9. android加密DESede/CBC/PKCS5Padding
  10. android权限属性的一些例子