Android 调用系统邮件程序发送邮件

方法一:


	private void mailTo(){
		Intent intent = new Intent(Intent.ACTION_SENDTO);
		
		Uri uri = Uri.parse("mailto:[email protected]");
		
		intent.setData(uri);
		
		this.startActivity(intent);
	}



方法二:

	private void mailSend(){
		
		String email = "[email protected]";
		String subject = "feedback";
		
		Intent intent = new Intent(Intent.ACTION_SEND);
		intent.setType("text/plain");
//		intent.setType("message/rfc882");
		intent.putExtra(Intent.EXTRA_EMAIL, new String[]{email});
		intent.putExtra(Intent.EXTRA_SUBJECT, subject);
		
		this.startActivity(Intent.createChooser(intent, "选择完成动作方式."));
		
	}


你可能感兴趣的:(Android 调用系统邮件程序发送邮件)