How to put message into Sent? [closed]

自古美人都是妖i 提交于 2020-01-07 05:03:49

问题


After sending the message with JavaMail by smtp, how to put it into the Sent folder(IMAP)? What about the non-english mail(ex: in Russian sent=отправленные)? Is there a way to get the name of the "sent" folder programmatically?


回答1:


Folder.appendMessages()

There's no standard name for the "sent" folder. Depending on the mail client being used, the folder might have a different name. There's an IMAP extension that would tell you which folder is the "sent" folder, but I don't think most servers support the extension.




回答2:


In general, the Sent Folder doesn't have a fixed name. Gmail, specifically supports 'special use extensions' for Folders. When you do a LIST to get the list of email boxes, it will tag the sent folder with a \Sent tag.

See Gmail's document for their implemented extensions.



来源:https://stackoverflow.com/questions/17619891/how-to-put-message-into-sent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!