Author |
|
grosquickkk Newbie
Joined: 26 March 2013 Location: France
Online Status: Offline Posts: 8
|
Posted: 26 March 2013 at 5:55am | IP Logged
|
|
|
HI, first of all sorry for my english.
I'm using Mailbee.net imap to read a Imap mailbox.
I'm using search method to display only unread emails + emails received "today" + not deleted + not mark as spam :
Code:
MailBee.ImapMail.UidCollection myCollection = (MailBee.ImapMail.UidCollection)_Imap.Search(true, "OR UNSEEN (SINCE " + DateTime.Now.Day.ToString () + "-" + GetMonth() + "-" + DateTime.Now.Year + " NOT DELETED) UNKEYWORD " + ImapUtils.ToQuotedString("$Spam"), null); |
|
|
I tried to mark some email as spam with this code :
Code:
_Imap.SetMessageFlags ( myCode, true, "$Spam" , MessageFlagAction.Add,false ); |
|
|
It works fine, they doesn't appear with the seach method I use
But when I open Outlook to see all that I'm doing, those emails are always in inbox, so do I have to move them in the spam folder with mailbee ?
Other question : Is there a way to block a sender adress, like in Outlook ?
Regards
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 26 March 2013 at 6:03am | IP Logged
|
|
|
Code:
I tried to mark some email as spam with this code :
_Imap.SetMessageFlags ( myCode, true, "$Spam" , MessageFlagAction.Add,false );
It works fine, they doesn't appear with the seach method I use |
|
|
Setting message flag does not affect message location, so if you believe the message should be moved to Spam folder, you should do that explicitly with Imap.MoveMessages method.
Code:
Is there a way to block a sender adress, like in Outlook ? |
|
|
Outlook probably uses its internal database for that, blocking sender is not something you can achieve using IMAP or other standard protocol.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
grosquickkk Newbie
Joined: 26 March 2013 Location: France
Online Status: Offline Posts: 8
|
Posted: 26 March 2013 at 6:16am | IP Logged
|
|
|
Thank you for your quick reply :)
Regards
|
Back to Top |
|
|
grosquickkk Newbie
Joined: 26 March 2013 Location: France
Online Status: Offline Posts: 8
|
Posted: 27 March 2013 at 8:38am | IP Logged
|
|
|
Just another problem
Code:
_Imap.SetMessageFlags(myCode, true, "$Spam", MessageFlagAction.Add, false);
if (_Imap.ExamineFolder("Spams") == false) _Imap.CreateFolder("Spams");
_Imap.MoveMessages(myCode, true, "Spams"); |
|
|
I have a MailBeeInvalidArgumentException with the MoveMessages method :
Code:
{MailBee.MailBeeInvalidArgumentException: Empty or null argument value is not allowed.
à b.c.o.b(String A_0)
à b.c.o.a(String A_0, Boolean A_1, String A_2, MessageFlagAction A_3, Boolean A_4)
à b.c.o.f(String A_0, Boolean A_1)
à b.c.o.b(String A_0, Boolean A_1, String A_2, UidPlusResult A_3)
à b.c.a.a(String A_0, Boolean A_1, String A_2, UidPlusResult A_3)
à b.c.a.b(Boolean A_0, String A_1, Boolean A_2, String A_3, UidPlusResult A_4)
à MailBee.ImapMail.Imap.MoveMessages(String messageIndexSet, Boolean indexIsUid, String targetFolderName, UidPlusResult result)
à MailBee.ImapMail.Imap.MoveMessages(String messageIndexSet, Boolean indexIsUid, String targetFolderName)
.... |
|
|
Don't really understand why, myCode isn't empty :/
regards
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 27 March 2013 at 9:03am | IP Logged
|
|
|
It's a known issue. This means the IMAP server is BAD, it does not actually support UIDPLUS extension but says clients that it's supported.
You can tell MailBee not to use IMAP extensions. Set MailBee.Global.SafeMode=true before creating an instance of Imap object.
Regards,
Alex
|
Back to Top |
|
|