Results 1 to 5 of 5

Thread: create filter rules using zimlets

  1. #1
    anands is offline Member
    Join Date
    Aug 2007
    Posts
    10
    Rep Power
    7

    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

  2. #2
    anands is offline Member
    Join Date
    Aug 2007
    Posts
    10
    Rep Power
    7

    Default

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

  3. #3
    jholder's Avatar
    jholder is offline Former Zimbran
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    20

    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"?

  4. #4
    anands is offline Member
    Join Date
    Aug 2007
    Posts
    10
    Rep Power
    7

    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

  5. #5
    anands is offline Member
    Join Date
    Aug 2007
    Posts
    10
    Rep Power
    7

    Default

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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Filter rules for chinese content
    By chanck in forum Users
    Replies: 1
    Last Post: 06-30-2007, 01:55 PM
  2. Replies: 3
    Last Post: 06-14-2007, 10:30 AM
  3. zmmailbox create filter on the command line
    By alimovz in forum Administrators
    Replies: 1
    Last Post: 01-29-2007, 02:55 PM
  4. possible bug with filter rules
    By psuter in forum Administrators
    Replies: 1
    Last Post: 11-22-2005, 08:52 AM
  5. Create tag bug in create new filter
    By PotatoBob in forum Developers
    Replies: 3
    Last Post: 10-31-2005, 09:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •