當前位置:首頁 » 安卓系統 » android郵件收發

android郵件收發

發布時間: 2022-09-23 19:08:06

① Android開發中怎樣調用系統Email發送郵件

在Android中,調用Email有三種類型的Intent: Intent.ACTION_SENDTO 無附件的發送 Intent.ACTION_SEND 帶附件的發送 Intent.ACTION_SEND_MULTIPLE 帶有多附件的發送 如: Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); //設置文本格式 emailIntent.setType("text/plain"); //設置對方郵件地址 emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, ""); //設置標題內容 emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,getString(R.string.setting_recommend_words)); //設置郵件文本內容 emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,getString(R.string.setting_recommend_words)); startActivity(Intent.createChooser(emailIntent,"Choose Email Client"));

② android接收郵件伺服器郵件如何設置

1、在手機上找到「郵件」應用程序

2、打開,出現「添加賬號

3、選擇賬號類型為「POP3POP」

4、「添加用戶」,輸入郵箱地址、用戶名以及郵箱顯示名

5、點擊「完成」或「下一步」,出現接收伺服器的配置選項

注意(使用默認設置,安全類型不要勾選SSL(若需要SSL請聯系公司管理員確認是否郵件伺服器已經安裝SSL伺服器安全證書)

6、點擊「完成」或「下一步」,出現接收伺服器的配置選項

7、輸入信息,填寫完成後,點擊右上角的「下一步」按鈕即可,最後檢查核對以上配置是否正確

8、設置完成,回到首頁菜單,點擊刷新,或接受郵件,進行郵件的收發

③ Android開發中怎樣調用系統Email發送郵件

在Android中,調用Email有三種類型的Intent:
Intent.ACTION_SENDTO 無附件的發送
Intent.ACTION_SEND 帶附件的發送
Intent.ACTION_SEND_MULTIPLE 帶有多附件的發送

【方法1】使用SENTTO發送

java">Intentdata=newIntent(Intent.ACTION_SENDTO);
data.setData(Uri.parse("mailto:[email protected]"));
data.putExtra(Intent.EXTRA_SUBJECT,"這是標題");
data.putExtra(Intent.EXTRA_TEXT,"這是內容");
startActivity(data);
Intentdata=newIntent(Intent.ACTION_SENDTO);
data.setData(Uri.parse("mailto:[email protected]"));
data.putExtra(Intent.EXTRA_SUBJECT,"這是標題");
data.putExtra(Intent.EXTRA_TEXT,"這是內容");
startActivity(data);

【方法2】使用SEND發送

Intentintent=newIntent(Intent.ACTION_SEND);
String[]tos={"[email protected]"};
String[]ccs={"[email protected]"};
String[]bccs={"[email protected]"};
intent.putExtra(Intent.EXTRA_EMAIL,tos);
intent.putExtra(Intent.EXTRA_CC,ccs);
intent.putExtra(Intent.EXTRA_BCC,bccs);
intent.putExtra(Intent.EXTRA_TEXT,"body");
intent.putExtra(Intent.EXTRA_SUBJECT,"subject");
intent.putExtra(Intent.EXTRA_STREAM,Uri.parse("file:///mnt/sdcard/a.jpg"));
intent.setType("image/*");
intent.setType("message/rfc882");
Intent.createChooser(intent,"ChooseEmailClient");
startActivity(intent);
Intentintent=newIntent(Intent.ACTION_SEND);
String[]tos={"[email protected]"};
String[]ccs={"[email protected]"};
String[]bccs={"[email protected]"};
intent.putExtra(Intent.EXTRA_EMAIL,tos);
intent.putExtra(Intent.EXTRA_CC,ccs);
intent.putExtra(Intent.EXTRA_BCC,bccs);
intent.putExtra(Intent.EXTRA_TEXT,"body");
intent.putExtra(Intent.EXTRA_SUBJECT,"subject");
intent.putExtra(Intent.EXTRA_STREAM,Uri.parse("file:///mnt/sdcard/a.jpg"));
intent.setType("image/*");
intent.setType("message/rfc882");
Intent.createChooser(intent,"ChooseEmailClient");
startActivity(intent);

很簡單,發送郵件中,有收件者,抄送者,密送者。 也就是分別通過
Intent.EXTRA_EMAIL,
Intent.EXTRA_CC,
Intent.EXTRA_BCC
來進行putExtra來設定的,而單個附件的發送,則使用Intent.EXTRA_STREAM來設置附件的地址Uri。

【方法3】使用SEND_MULTIPLE來進行多附件的發送

Intentintent=newIntent(Intent.ACTION_SEND_MULTIPLE);
String[]tos={"[email protected]"};
String[]ccs={"[email protected]"};
intent.putExtra(Intent.EXTRA_EMAIL,tos);
intent.putExtra(Intent.EXTRA_CC,ccs);
intent.putExtra(Intent.EXTRA_TEXT,"body");
intent.putExtra(Intent.EXTRA_SUBJECT,"subject");
ArrayList<uri>imageUris=newArrayList<uri>();
imageUris.add(Uri.parse("file:///mnt/sdcard/a.jpg"));
imageUris.add(Uri.parse("file:///mnt/sdcard/b.jpg"));
intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM,imageUris);
intent.setType("image/*");
intent.setType("message/rfc882");
Intent.createChooser(intent,"ChooseEmailClient");
startActivity(intent);
Intentintent=newIntent(Intent.ACTION_SEND_MULTIPLE);
String[]tos={"[email protected]"};
String[]ccs={"[email protected]"};
intent.putExtra(Intent.EXTRA_EMAIL,tos);
intent.putExtra(Intent.EXTRA_CC,ccs);
intent.putExtra(Intent.EXTRA_TEXT,"body");
intent.putExtra(Intent.EXTRA_SUBJECT,"subject");
ArrayList<uri>imageUris=newArrayList<uri>();
imageUris.add(Uri.parse("file:///mnt/sdcard/a.jpg"));
imageUris.add(Uri.parse("file:///mnt/sdcard/b.jpg"));
intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM,imageUris);
intent.setType("image/*");
intent.setType("message/rfc882");
Intent.createChooser(intent,"ChooseEmailClient");
startActivity(intent);

④ Android開發中怎樣調用系統Email發送郵件

在Android中,調用Email有三種類型的Intent:
Intent.ACTION_SENDTO 無附件的發送

Intent.ACTION_SEND 帶附件的發送
Intent.ACTION_SEND_MULTIPLE 帶有多附件的發送
如:
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
//設置文本格式
emailIntent.setType("text/plain");
//設置對方郵件地址
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, "");
//設置標題內容
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,getString(R.string.setting_recommend_words));
//設置郵件文本內容
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,getString(R.string.setting_recommend_words));
startActivity(Intent.createChooser(emailIntent,"Choose Email Client"));

⑤ android怎樣不打開系統瀏覽器實現了發送郵件

  1. 下載javamail的java包,加入到你項目的庫中。

  2. 2.修改你的郵箱設置,這里以163郵箱為例。打開設置,開啟客戶端授權碼,記住這個授權碼,然後打開POP3/SMTP服務和IMAP/SMTP服務。

  3. 輸入相應的代碼(私我給你發)

  4. 在使用該庫前先簡單介紹一下 Email for Android 2.3.2 中四個核心的類和相關的方法。

  5. EmailConfig 類

  6. setAccount( ):設置發信人的郵箱(必寫)

  7. setPassword( ) :設置發信人的郵箱密碼或授權碼(必寫)

  8. setSmtpHost( ):設置SMTP伺服器地址(發送郵件時必寫)

  9. setSmtpPort( ):設置SMTP伺服器埠(發送郵件時必寫)

  10. setPopHost( ):設置POP伺服器地址(接收郵件時必寫)

  11. setPopPort( ):設置POP伺服器埠(接收郵件時必寫)

  12. setImapHost:設置IMAP伺服器地址(接收郵件時必寫)

  13. setImapPort:設置IMAP伺服器埠(接收郵件時必寫)

  14. EmailSendClient 類

  15. setTo( ):設置收信人郵箱(必寫)

  16. setCc( ):設置抄送人

  17. setBcc( ):設置密送人

  18. setNickname( ):設置發信人昵稱

  19. setSubject( ):設置郵件主題(必寫)

  20. setText( ):設置文本型的郵件內容(必寫,但 setText( ) 和 setContent( ) 只能二選一)

  21. setContent( ):設置HTML型的郵件內容(同上)

  22. sendAsyn( ):非同步發送郵件(必寫)

  23. EmailReceiveClient 類

  24. popReceiveAsyn( ):使用POP3協議非同步接收郵件

  25. imapReceiveAsyn( ):使用IMAP協議非同步接收郵件

  26. EmailExamine 類

  27. connectServer( ):檢查郵件伺服器配

⑥ 如何設置Android系統電子郵件客戶端

第一步:點擊【設置】,進入【添加帳戶】-->【電子郵件】打開設置電子郵件界面;

安卓系統自帶的郵件,我平常用網易郵箱,但賬號輸進去後接收伺服器和發送伺服器該怎麼設置

樓主你好!解決方法如下:
1、第一步:在網頁上登錄 你的郵箱,
2、在歡迎頁正上方點擊「設置」
3、-->「郵箱設置」
4、-->「郵件收發
5、—POP3/SMTP/IMAP」中開啟 POP3/SMTP/IMAP服務。
6、打開手機,進入Android系統的「郵件」;
7、點擊菜單鍵,選擇「更多」-->「新建賬戶」;
8、選擇郵件提供商「其它(POP3/IMAP)」;
9、輸入您的完整的郵箱用戶名和郵箱密碼,
10、點擊「下一步」;
11、收件伺服器設置如下圖(默認為POP),
12、設置完點擊「下一步」;
13、賬戶設置完畢,
14、填寫賬戶的名稱及顯示在發件人的名稱,
15、點擊「結束設置」即可收發郵件了。
16、補充:如果你是使用iC·0r·em·ail的郵件系統託管的話,可以選擇使用郵件信息移動推送功能,這就無需以上的步驟了,因為他不用安裝客戶端
17、或者你可以致電給負責運維你的iCM技術團隊,他們就可以詳細手把手教你設置的了。

以上!望採納!

⑧ Android開發中怎樣調用系統Email發送郵件

在Android中,調用Email有三種類型的Intent: Intent.ACTION_SENDTO 無附件的發送 Intent.ACTION_SEND 帶附件的發送 Intent.ACTION_SEND_MULTIPLE 帶有多附件的發送 當然,所謂的調用Email,只是說Email可以接收Intent並做這些事情,可能也有其他的應用程序實現了相關功能,所以在執行的時候,會出現選擇框進行選擇。 1.使用SENTTO發送
Intent data=new Intent(Intent.ACTION_SENDTO); data.setData(Uri.parse("mailto:[email protected]")); data.putExtra(Intent.EXTRA_SUBJECT, "這是標題"); data.putExtra(Intent.EXTRA_TEXT, "這是內容"); startActivity(data); Intent data=new Intent(Intent.ACTION_SENDTO); data.setData(Uri.parse("mailto:[email protected]")); data.putExtra(Intent.EXTRA_SUBJECT, "這是標題"); data.putExtra(Intent.EXTRA_TEXT, "這是內容"); startActivity(data);

通過向Intent中putExtra來設定郵件的相關參數。 2.使用SEND發送
Intent intent = new Intent(Intent.ACTION_SEND); String[] tos = { "[email protected]" }; String[] ccs = { "[email protected]" }; String[] bccs = {"[email protected]"}; intent.putExtra(Intent.EXTRA_EMAIL, tos); intent.putExtra(Intent.EXTRA_CC, ccs); intent.putExtra(Intent.EXTRA_BCC, bccs); intent.putExtra(Intent.EXTRA_TEXT, "body"); intent.putExtra(Intent.EXTRA_SUBJECT, "subject"); intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///mnt/sdcard/a.jpg")); intent.setType("image/*"); intent.setType("message/rfc882"); Intent.createChooser(intent, "Choose Email Client"); startActivity(intent); Intent intent = new Intent(Intent.ACTION_SEND); String[] tos = { "[email protected]" }; String[] ccs = { "[email protected]" }; String[] bccs = {"[email protected]"}; intent.putExtra(Intent.EXTRA_EMAIL, tos); intent.putExtra(Intent.EXTRA_CC, ccs); intent.putExtra(Intent.EXTRA_BCC, bccs); intent.putExtra(Intent.EXTRA_TEXT, "body"); intent.putExtra(Intent.EXTRA_SUBJECT, "subject"); intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///mnt/sdcard/a.jpg")); intent.setType("image/*"); intent.setType("message/rfc882"); Intent.createChooser(intent, "Choose Email Client"); startActivity(intent);

很簡單,發送郵件中,有收件者,抄送者,密送者。 也就是分別通過 Intent.EXTRA_EMAIL, Intent.EXTRA_CC, Intent.EXTRA_BCC 來進行putExtra來設定的,而單個附件的發送,則使用Intent.EXTRA_STREAM來設置附件的地址Uri。 3.使用SEND_MULTIPLE來進行多附件的發送

Intent intent = new Intent(Intent.ACTION_SEND_MULTIPLE); String[] tos = { "[email protected]" }; String[] ccs = { "[email protected]" }; intent.putExtra(Intent.EXTRA_EMAIL, tos); intent.putExtra(Intent.EXTRA_CC, ccs); intent.putExtra(Intent.EXTRA_TEXT, "body"); intent.putExtra(Intent.EXTRA_SUBJECT, "subject"); ArrayList<uri> imageUris = new ArrayList<uri>(); imageUris.add(Uri.parse("file:///mnt/sdcard/a.jpg")); imageUris.add(Uri.parse("file:///mnt/sdcard/b.jpg")); intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, imageUris); intent.setType("image/*"); intent.setType("message/rfc882"); Intent.createChooser(intent, "Choose Email Client"); startActivity(intent); Intent intent = new Intent(Intent.ACTION_SEND_MULTIPLE); String[] tos = { "[email protected]" }; String[] ccs = { "[email protected]" }; intent.putExtra(Intent.EXTRA_EMAIL, tos); intent.putExtra(Intent.EXTRA_CC, ccs); intent.putExtra(Intent.EXTRA_TEXT, "body"); intent.putExtra(Intent.EXTRA_SUBJECT, "subject"); ArrayList<uri> imageUris = new ArrayList<uri>(); imageUris.add(Uri.parse("file:///mnt/sdcard/a.jpg")); imageUris.add(Uri.parse("file:///mnt/sdcard/b.jpg")); intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, imageUris); intent.setType("image/*"); intent.setType("message/rfc882"); Intent.createChooser(intent, "Choose Email Client"); startActivity(intent);

發送多個附件,最主要的時候,通過putParcelableArrayListExtra將多個附件的Uri地址List設置進去就OK了。其實還是很簡單的。

⑨ 如何設置Android系統的郵件客戶端收發郵件

(註:所有項均為必填項,特別要注意一定要填寫發件人的用戶名及密碼)接收郵件伺服器: 協議:選擇「POP」頁簽。 電子郵件地址:請填寫您的郵箱帳戶全名。 用戶名:請填寫您的郵箱帳戶全名。 密碼:請填寫您的郵箱密碼 POP伺服器:請填寫POP地址(點此查詢客戶端配置地址) 伺服器埠:參數設置為:110。 如果您的郵件收發需要採用SSL加密,「安全類型」選擇SSL,伺服器埠參數設置為:1995。 4.點擊下一步,在「發送郵件伺服器設置」頁面設置發件伺服器的信息(註:所有項均為必填項,特別要注意一定要填寫發件人的用戶名及密碼)發送伺服器: 用戶名:請填寫您的郵箱帳戶全名。 密碼:請填寫您的郵箱密碼。 SMTP伺服器:請填寫SMTP地址。(點此查詢客戶端配置地址) 伺服器埠:參數設置為:25。如果您的郵件收發需要採用SSL加密,「安全類型」選擇SSL,伺服器埠參數設置為:465。 5.點擊「下一步」,如您需要修改姓名,請點擊「您的姓名」輸入欄輸入,如果勾選了「設為我的默認賬戶」則此賬戶會設置為手機郵件的默認賬戶。 6.點擊結束設置,接下來您就可以在手機上進行郵件的收發了。

熱點內容
安卓手機如何繞過緩存軟體 發布:2025-03-16 22:35:16 瀏覽:241
c語言求職 發布:2025-03-16 22:34:23 瀏覽:429
在線教育培訓源碼 發布:2025-03-16 22:31:57 瀏覽:233
反編譯vb工具 發布:2025-03-16 22:27:04 瀏覽:353
安卓流程為什麼越來越多 發布:2025-03-16 22:26:50 瀏覽:933
五軸編程模型 發布:2025-03-16 22:17:48 瀏覽:181
linuxc函數庫 發布:2025-03-16 22:03:33 瀏覽:921
iphone最新版系統從哪裡改密碼 發布:2025-03-16 21:56:19 瀏覽:596
python的execute 發布:2025-03-16 21:40:24 瀏覽:767
今天的訪問量就靠你了 發布:2025-03-16 21:39:35 瀏覽:430