Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET IMAP

 AfterLogic Forum : MailBee.NET IMAP
Subject Topic: Mark as spam and block sender Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
grosquickkk
Newbie
Newbie


Joined: 26 March 2013
Location: France
Online Status: Offline
Posts: 8
Posted: 26 March 2013 at 5:55am | IP Logged Quote grosquickkk

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 View grosquickkk's Profile Search for other posts by grosquickkk
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 26 March 2013 at 6:03am | IP Logged Quote Igor

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 View Igor's Profile Search for other posts by Igor
 
grosquickkk
Newbie
Newbie


Joined: 26 March 2013
Location: France
Online Status: Offline
Posts: 8
Posted: 26 March 2013 at 6:16am | IP Logged Quote grosquickkk

Thank you for your quick reply :)

Regards
Back to Top View grosquickkk's Profile Search for other posts by grosquickkk
 
grosquickkk
Newbie
Newbie


Joined: 26 March 2013
Location: France
Online Status: Offline
Posts: 8
Posted: 27 March 2013 at 8:38am | IP Logged Quote grosquickkk

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 View grosquickkk's Profile Search for other posts by grosquickkk
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 27 March 2013 at 9:03am | IP Logged Quote Alex

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 View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide