org.apache.james.transport.mailets
Class UseHeaderRecipients

java.lang.Object
  |
  +--org.apache.mailet.GenericMailet
        |
        +--org.apache.james.transport.mailets.UseHeaderRecipients
All Implemented Interfaces:
Mailet, MailetConfig

public class UseHeaderRecipients
extends GenericMailet

Mailet designed to process the recipients from the mail headers rather than the recipients specified in the SMTP message header. This can be useful if your mail is redirected on-route by a mail server that substitutes a fixed recipient address for the original.

To use this, match against the redirection address using the RecipientIs matcher and set the mailet 'class' to UseHeaderRecipients. This will cause the email to be re-injected into the root process with the recipient substituted by all the recipients in the Mail-For, To and Cc headers of the message.

e.g.

    
    
 

Version:
1.0.0, 24/11/2000
Author:
Stuart Roebuck

Constructor Summary
UseHeaderRecipients()
           
 
Method Summary
 java.lang.String getMailetInfo()
          Returns information about the mailet, such as author, version, and copyright.
 void service(Mail mail)
          Process an incoming email, removing the currently identified recipients and replacing them with the recipients indicated in the Mail-For, To and Cc headers of the actual email.
 
Methods inherited from class org.apache.mailet.GenericMailet
destroy, getInitParameter, getInitParameterNames, getMailetConfig, getMailetContext, getMailetName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UseHeaderRecipients

public UseHeaderRecipients()
Method Detail

service

public void service(Mail mail)
             throws javax.mail.MessagingException
Process an incoming email, removing the currently identified recipients and replacing them with the recipients indicated in the Mail-For, To and Cc headers of the actual email.

Specified by:
service in interface Mailet
Specified by:
service in class GenericMailet
Parameters:
mail - incoming email
Throws:
javax.mail.MessagingException - - if an exception occurs that interferes with the mailet's normal operation occurred

getMailetInfo

public java.lang.String getMailetInfo()
Description copied from class: GenericMailet
Returns information about the mailet, such as author, version, and copyright. By default, this method returns an empty string. Override this method to have it return a meaningful value.

Specified by:
getMailetInfo in interface Mailet
Overrides:
getMailetInfo in class GenericMailet
Returns:
String information about this mailet, by default an empty string


"Copyright © 2001 Apache Jakarta Project. All Rights Reserved."