[英]How to send an email from a specific mail to some other email id?
我想將一些憑據通過電子郵件發送到特定的電子郵件地 從哪個電子郵件地址發送此郵件?
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("message/rfc822"); i.putExtra(Intent.EXTRA_EMAIL , new
String[]{"recipient@example.com"}); i.putExtra(Intent.EXTRA_SUBJECT,
"subject of email"); i.putExtra(Intent.EXTRA_TEXT , "body of
email");
try {
startActivity(Intent.createChooser(i, "Send mail...")); } catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(MyActivity.this, "There are no email clients installed.", Toast.LENGTH_SHORT).show();
}
誰是這里的發件人?
此意圖將打開設備中可用的郵件客戶端。 然后由您來添加發件人電子郵件ID。 如果您已經登錄,它將采用默認電子郵件ID。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.