请检查下面提到的代码。我也使用了 Java 邮件 api,但是使用了用户名和密码。有没有其他方法可以获取电子邮件发送或取消的状态。请告诉我在android中处理电子邮件发送或取消状态的过程。
Intent emailActivity = new Intent(Intent.ACTION_SEND);
// set up the recipient address
emailActivity.putExtra(Intent.EXTRA_EMAIL, new String[] { to });
// set up the email subject
emailActivity.putExtra(Intent.EXTRA_SUBJECT, subject);
// you can specify cc addresses as well
// email.putExtra(Intent.EXTRA_CC, new String[]{ ...});
// email.putExtra(Intent.EXTRA_BCC, new String[]{ ... });
// set up the message body
emailActivity.putExtra(Intent.EXTRA_TEXT, message);
emailActivity.setType("message/rfc822");
startActivityForResult(Intent.createChooser(emailActivity,
"Select your Email Provider :"), 1000);