簡體   English   中英

如何從特定郵件發送電子郵件到其他電子郵件ID?

[英]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。

您應該使用JavaMail Api這樣您可以通過以下方式發送和訪問電子郵件: - 檢查這個

這是圖書館

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM