|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.mailet.GenericMailet org.apache.james.transport.mailets.UseHeaderRecipients
public class UseHeaderRecipients
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.
Constructor Summary | |
---|---|
UseHeaderRecipients()
|
Method Summary | |
---|---|
java.lang.String |
getMailetInfo()
Return a string describing this mailet. |
void |
init()
Initialize the mailet initializes the DEBUG flag |
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, getInitParameter, getInitParameterNames, getMailetConfig, getMailetContext, getMailetName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UseHeaderRecipients()
Method Detail |
---|
public void init()
init
in class GenericMailet
public void service(Mail mail) throws javax.mail.MessagingException
service
in interface Mailet
service
in class GenericMailet
mail
- incoming email
javax.mail.MessagingException
- - if an exception occurs that interferes with the mailet's normal operationpublic java.lang.String getMailetInfo()
getMailetInfo
in interface Mailet
getMailetInfo
in class GenericMailet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |