Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-12-2007, 11:17 PM
Member
 
Posts: 10
Default create filter rules using zimlets

Im trying to create a mail filter rule on the fly , i was able to create a new rule, condition , action but in action my action is to redirect the corresponding messages to a certain folder(in my case "test" which already exists) , but i was not able to select a folder on the fly , it shows only browse button , can any one have any idea on how to go about this, i have pasted my code below

this._filter = new ZmFilterRule("test",true);
this._filter.setName("test");


this._condition = new ZmCondition(ZmFilterRule.C_FROM,ZmFilterRule.OP_MA TCHES,"test@test.net");
this._action = new ZmAction(ZmFilterRule.A_FOLDER,"test");


this._filter.addCondition(this._condition);
this._filter.addAction(this._action);

this._filterRule = new ZmFilterRules(this._appCtxt);
this._filterRule.addRule(this._filter);

any reply is deeply appreciated
Reply With Quote
  #2 (permalink)  
Old 08-15-2007, 09:12 PM
Member
 
Posts: 10
Default

Please somebody reply to my post , it will be helpful to me , iam new zimbra/zimlets so any help is deeply appreciated
Reply With Quote
  #3 (permalink)  
Old 08-15-2007, 09:26 PM
Former Zimbran
 
Posts: 5,606
Default

Did you know that you can create filters on the fly by right clicking on a message you wish to construct a filter for, and click "Add Filter"?
Reply With Quote
  #4 (permalink)  
Old 08-15-2007, 09:44 PM
Member
 
Posts: 10
Default

Hi jholder,

Thanks for the reply , but i will write my situation here , i will be receiving a mail from say test@test.com and i want that mail to be redirected to a folder called say "test" (but these filter rules should be created from the zimlet while sending a mail) .I have a zimlet which sends a mail to some persons upon doing some tasks, while sending the mail we present the user with some options create some rule for redirect test@test.com to test folder(the option will be a check box), so that the zimlet will create the filter rules , in that case how will i do that as iam not aware about "creating filters on the fly by right clicking on a message"
I was able to create conditions but while creating the actions i was not able select the folder
please refer my first post and see whether some thing can be done through it(code)

Thanks for your quick response,
Anand Samuel
Reply With Quote
  #5 (permalink)  
Old 08-16-2007, 09:53 PM
Member
 
Posts: 10
Default

Please somebody reply to my post , it will be helpful to me , iam new to zimbra/zimlets so any help is deeply appreciated
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.