Alberto Ochoa wrote:
>
> What are the rules for the vector that is returned by the match servlets'
> method?
>
> public Vector match(Mail mail, String condition)
> Vector matchingRecipients = new Vector();
> ....
> return matchingRecipients;
>
> Where are these vectors returned to?
>
> Thank you Alberto Ochoa
>
Look in the last CVS update... the match interface has been modified.
Anyway a Matcher is not a mailet... it is the "router class" inside the
pipe processing line.
A match define a rule to check mail (recipients) against. Last interface
is defined as:
Mail[] match(Mail mail);
The method return two Mail object, [0] is the part of the incoming mail
matching the condition implemented by this specific matcher, the seconf
is the part not matching. One, but not both, mail returned can be null
if no recipient in the mail match condition or all match it.
Es.
Mail
recipients: [EMAIL PROTECTED],[EMAIL PROTECTED]
sender: [EMAIL PROTECTED]
body: "...." 200Kb
------------
Matcher RecipientIs="[EMAIL PROTECTED]"
will return
mail[0]
recipients: [EMAIL PROTECTED]
sender: [EMAIL PROTECTED]
body: "...." 200Kb
mail[1]
recipients: [EMAIL PROTECTED]
sender: [EMAIL PROTECTED]
body: "...." 200Kb
------------
Matcher SizeIsOver="100Kb"
will return
mail[0]
recipients: [EMAIL PROTECTED],[EMAIL PROTECTED]
sender: [EMAIL PROTECTED]
body: "...." 200Kb
mail[1]
null
etc.
Fede
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/>
Problems?: [EMAIL PROTECTED]