public class Forward extends AbstractRedirect
Replaces incoming recipients with those specified, and resends the message unaltered.
Can be totally replaced by an equivalent usage of Resend (see below),
simply replacing <forwardto> with <recipients>.
Sample configuration:
<mailet match="All" class="Forward">
<forwardTo>comma delimited list of email addresses</forwardTo>
<passThrough>true or false, default=false</passThrough>
<fakeDomainCheck>true or false, default=true</fakeDomainCheck>
<debug>true or false, default=false</debug>
</mailet>
The behaviour of this mailet is equivalent to using Resend with the following configuration:
<mailet match="All" class="Resend">
<recipients>comma delimited list of email addresses</recipients>
<passThrough>true or false</passThrough>
<fakeDomainCheck>true or false</fakeDomainCheck>
<debug>true or false</debug>
</mailet>
forwardto can be used instead of forwardTo; such name is kept for backward compatibility.
AbstractRedirect.SpecialAddress| Constructor and Description |
|---|
Forward() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
attachError()
Gets the
attachError property. |
protected String[] |
getAllowedInitParameters()
Gets the expected init parameters.
|
protected int |
getAttachmentType()
Gets the
attachment property. |
protected int |
getInLineType()
Gets the
inline property. |
String |
getMailetInfo()
Return a string describing this mailet.
|
protected String |
getMessage()
Gets the
message property. |
protected Collection |
getRecipients()
Gets the
recipients property. |
protected org.apache.mailet.MailAddress |
getReplyTo()
Gets the
replyto property. |
protected org.apache.mailet.MailAddress |
getReversePath()
Gets the
reversePath property. |
protected org.apache.mailet.MailAddress |
getSender()
Gets the
sender property. |
protected String |
getSubject()
Gets the
subject property. |
protected String |
getSubjectPrefix()
Gets the
prefix property. |
protected javax.mail.internet.InternetAddress[] |
getTo()
Gets the
to property. |
protected boolean |
isReply()
Gets the
isReply property. |
attachError, buildAlteredMessage, changeSubject, getAttachmentType, getFakeDomainCheck, getFakeDomainCheck, getInLineType, getMessage, getMessageHeaders, getPassThrough, getPassThrough, getRecipients, getReplyTo, getReversePath, getSender, getSpecialAddress, getSubject, getSubjectPrefix, getTo, getTypeCode, init, isReply, isStatic, replaceInternetAddresses, replaceMailAddresses, senderDomainIsValid, service, setDNSService, setIsReply, setRecipients, setReplyTo, setReversePath, setSender, setSubjectPrefix, setTopublic String getMailetInfo()
getMailetInfo in interface org.apache.mailet.MailetgetMailetInfo in class org.apache.mailet.base.GenericMailetprotected String[] getAllowedInitParameters()
getAllowedInitParameters in class AbstractRedirectprotected int getInLineType()
throws javax.mail.MessagingException
AbstractRedirectinline property. May return one of the following
values to indicate how to append the original message to build the new
message:
UNALTERED : original message is the new message bodyBODY : original message body is appended to the new
messageHEADS : original message headers are appended to the new
messageALL : original is appended with all headersNONE : original is not appendedgetInLineType in class AbstractRedirectjavax.mail.MessagingExceptionprotected int getAttachmentType()
throws javax.mail.MessagingException
AbstractRedirectattachment property. May return one of the
following values to indicate how to attach the original message to the
new message:
BODY : original message body is attached as plain text
to the new messageHEADS : original message headers are attached as plain
text to the new messageALL : original is attached as plain text with all
headersMESSAGE : original message is attached as type
message/rfc822, a complete mail message.NONE : original is not attachedgetAttachmentType in class AbstractRedirectjavax.mail.MessagingExceptionprotected String getMessage() throws javax.mail.MessagingException
AbstractRedirectmessage property. Returns a message to which the
original message can be attached/appended to build the new message. Is a
"getX()" method.getMessage in class AbstractRedirectjavax.mail.MessagingExceptionprotected Collection getRecipients() throws javax.mail.MessagingException
AbstractRedirectrecipients property. Returns the collection of
recipients of the new message, or null if no change is requested. Is a
"getX()" method.getRecipients in class AbstractRedirectrecipients init parameter or null if missingjavax.mail.MessagingExceptionprotected javax.mail.internet.InternetAddress[] getTo()
throws javax.mail.MessagingException
AbstractRedirectto property. Returns the "To:" recipients of the
new message. or null if no change is requested. Is a "getX()" method.getTo in class AbstractRedirectjavax.mail.MessagingExceptionprotected org.apache.mailet.MailAddress getReplyTo()
throws javax.mail.MessagingException
AbstractRedirectreplyto property. Returns the Reply-To address of
the new message, or null if no change is requested. Is a "getX()" method.getReplyTo in class AbstractRedirectjavax.mail.MessagingExceptionprotected org.apache.mailet.MailAddress getReversePath()
throws javax.mail.MessagingException
AbstractRedirectreversePath property. Returns the reverse-path of
the new message, or null if no change is requested. Is a "getX()" method.getReversePath in class AbstractRedirectjavax.mail.MessagingExceptionprotected org.apache.mailet.MailAddress getSender()
throws javax.mail.MessagingException
AbstractRedirectsender property. Returns the new sender as a
MailAddress, or null if no change is requested. Is a "getX()" method.getSender in class AbstractRedirectjavax.mail.MessagingExceptionprotected String getSubject() throws javax.mail.MessagingException
AbstractRedirectsubject property. Returns a string for the new
message subject. Is a "getX()" method.getSubject in class AbstractRedirectjavax.mail.MessagingExceptionprotected String getSubjectPrefix() throws javax.mail.MessagingException
AbstractRedirectprefix property. Returns a prefix for the new
message subject. Is a "getX()" method.getSubjectPrefix in class AbstractRedirectjavax.mail.MessagingExceptionprotected boolean attachError()
AbstractRedirectattachError property. Returns a boolean indicating
whether to append a description of any error to the main body part of the
new message, if getInlineType does not return "UNALTERED". Is a "getX()"
method.attachError in class AbstractRedirectprotected boolean isReply()
throws javax.mail.MessagingException
AbstractRedirectisReply property. Returns a boolean indicating
whether the new message must be considered a reply to the original
message, setting the IN_REPLY_TO header of the new message to the id of
the original message. Is a "getX()" method.isReply in class AbstractRedirectjavax.mail.MessagingExceptionCopyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.