c# - get sent mails via imap -
does know how can sent mails specific user using ae.net mail library?
i've tried this:
imap = new imapclient(imapmailserver, username, password, imapclient.authmethods.login, imapmailport, imapusessl); if (imap.isconnected) { imap.selectmailbox("inbox"); var msg = imap.searchmessages(searchcondition.to("examplemail@gmail.com")); }
but without success (msg collection empty)...
edit (solution):
i had select sent folder instead of inbox. because using gmail, gmail's sent mail folder named "[gmail]/sent mail". has be:
imap.selectmailbox("[gmail]/sent mail");
are looking message you've sent? in case, they're in sent folder, [gmail]/sent mail
on google.
Comments
Post a Comment