Hi,
i've the below question!
i want to delete all mail older than a range of date in Inbox an Sent Item.
In order to do this i've write this code:
m_Imap.SelectFolder("Inbox");
messages = m_Imap.Search
(
ImapSearchParameter.Arrived(StartDate, EndDate),
ImapSearchParameter.Sent(StartDate, EndDate)
);
ImapMessageSet mailToBeDeleted = new ImapMessageSet();
foreach (ImapMessageInfo messPartial in messages)
{
mailToBeDeleted.Add(messPartial.UniqueId);
} // End for
m_Imap.DeleteMessage(mailToBeDeleted);
m_Imap.Purge();
This code works for inbox mail bath not for sent mail;
What's wrong?
Other Question. if i use getfolderlist i don't see any folder "Sent Items". Why?
My imap server is gmail. My end server is exchage.
Best Regards
Enrico