Click here to Skip to main content
16,004,574 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using the ActiveUp.Net.Mail to connect gmail and get mails from Inbox . I want to get mails after a specific date , hour and minute . I tryed for a specific date and it worked succesfully but when I added a time on my query it was stopped
This is my code
private MessageCollection GetMailsSinceDate(string mailBox , DateTime dt)
        {
            Mailbox mails = Client.SelectMailbox(mailBox);
            MessageCollection messages = mails.SearchParse("SENTSINCE 02-Dec-2014");
            return messages;
        }

This code works ,but if I use :
MessageCollection messages = mails.SearchParse("SENTSINCE 02-Dec-2014 13:07:29");


This exception appears : Command "search SENTSINCE 02-Dec-2014 13:07:29" failed : 141202032754582 BAD Could not parse command

Can anyone help me please ! Thanks
Posted
Comments
Kornfeld Eliyahu Peter 2-Dec-14 9:43am    
Why not ask ActiveUp?
amiach 2-Dec-14 9:45am    
I already asked but in vain

1 solution

Hi,

this is not an issue of ActiveUp.Net.Mail.

It is an issue of IMAP protocol.

The IMAP protocol does not support searches at a granularity finer than a day.

Please refer to http://www.ietf.org/rfc/rfc3501.txt[^]

There it says:
"SENTSINCE
Messages whose [RFC-2822] Date: header (disregarding time and
timezone) is within or later than the specified date."

Best regards,
Stephan
 
Share this answer
 
Comments
BillWoodruff 2-Dec-14 16:13pm    
+5
TheRealSteveJudge 3-Dec-14 2:44am    
Thx
amiach 3-Dec-14 4:27am    
Thanks !
TheRealSteveJudge 3-Dec-14 4:42am    
You're welcome! If you like the solution please vote.
txirrita 22-Jan-15 7:02am    
Could you please tell me if it's possible to search in all subfolders?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900