简体   繁体   English

如何使用javaxmail android读取gmail的已发送邮件

[英]how to read Sent Mails of gmail using javaxmail android

How can I get mails from Sent Mail folder of gmail? 如何从gmail的“已发送邮件”文件夹中获取邮件? I can get mails from inbox using 我可以使用以下方式从收件箱中获取邮件

store = imapSession.getStore("imaps");
store.connect("imap.gmail.com", user, password);
Folder folder = store.getFolder("Inbox");

I have tried, 我努力了,

Folder folder = store.getFolder("Sent");
//and
Folder folder = store.getFolder("AllMail");

but none of this is working, I'm getting a FolderNotFoundException . 但是这都不起作用,我得到了FolderNotFoundException

The GMail folders for Sent, Drafts and so on, are prefixed with the tag [Gmail] , so for the Sent Mail, it would be accessed like so: “已发送”,“草稿”等GMail文件夹的前缀为[Gmail] ,因此对于“已发送邮件”,其访问方式如下:

Folder folder = store.getFolder("[Gmail]/Sent Mail");

Link: 链接:
Gmail folders in your mail client 邮件客户端中的Gmail文件夹

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM