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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UseHeaderRecipients
public UseHeaderRecipients()
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.
- Overrides:
service
in class GenericMailet
- Parameters:
mail
- incoming email
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.
- Overrides:
getMailetInfo
in class GenericMailet
- Following copied from class:
org.apache.mailet.GenericMailet
- Returns:
- String information about this mailet, by default an empty string
"Copyright © 2001 Apache Jakarta Project. All Rights Reserved."