dynames0098
2/21/2018 - 1:11 AM

android发送邮件

intent发送邮件,指定收件人

//ACTION_SENDTO,不是ACTION_SEND
Intent intent = new Intent(Intent.ACTION_SENDTO);
intent.setType("text/html");
//收件人
intent.setData(Uri.parse("mailto:weipeng0098@126.com"));
intent.putExtra(Intent.EXTRA_EMAIL, "emailaddress@emailaddress.com");
//主题
intent.putExtra(Intent.EXTRA_SUBJECT, "About AxivBrowser");
//主体部分
intent.putExtra(Intent.EXTRA_TEXT, "Just HELLO?");
startActivity(Intent.createChooser(intent, "Send Email"));