|
||||||||||
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.AbstractRedirect org.apache.james.transport.mailets.Forward
public class Forward
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.james.transport.mailets.AbstractRedirect |
---|
AbstractRedirect.SpecialAddress |
Field Summary |
---|
Fields inherited from class org.apache.james.transport.mailets.AbstractRedirect |
---|
ALL, BODY, HEADS, isDebug, isStatic, MESSAGE, NONE, UNALTERED |
Constructor Summary | |
---|---|
Forward()
|
Method Summary | |
---|---|
protected boolean |
attachError()
Gets the attachError property. |
protected java.lang.String[] |
getAllowedInitParameters()
Gets the expected init parameters. |
protected int |
getAttachmentType()
Gets the attachment property. |
protected int |
getInLineType()
Gets the inline property. |
java.lang.String |
getMailetInfo()
Return a string describing this mailet. |
protected java.lang.String |
getMessage()
Gets the message property. |
protected java.util.Collection |
getRecipients()
Gets the recipients property. |
protected MailAddress |
getReplyTo()
Gets the replyto property. |
protected MailAddress |
getReversePath()
Gets the reversePath property. |
protected MailAddress |
getSender()
Gets the sender property. |
protected java.lang.String |
getSubject()
Gets the subject property. |
protected java.lang.String |
getSubjectPrefix()
Gets the prefix property. |
protected javax.mail.internet.InternetAddress[] |
getTo()
Gets the to property. |
protected boolean |
isReply()
Gets the isReply property. |
Methods inherited from class org.apache.james.transport.mailets.AbstractRedirect |
---|
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, setIsReply, setRecipients, setReplyTo, setReversePath, setSender, setSubjectPrefix, setTo |
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 Forward()
Method Detail |
---|
public java.lang.String getMailetInfo()
getMailetInfo
in interface Mailet
getMailetInfo
in class GenericMailet
protected java.lang.String[] getAllowedInitParameters()
getAllowedInitParameters
in class AbstractRedirect
protected int getInLineType() throws javax.mail.MessagingException
AbstractRedirect
inline
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 appended
getInLineType
in class AbstractRedirect
javax.mail.MessagingException
protected int getAttachmentType() throws javax.mail.MessagingException
AbstractRedirect
attachment
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 attached
getAttachmentType
in class AbstractRedirect
javax.mail.MessagingException
protected java.lang.String getMessage() throws javax.mail.MessagingException
AbstractRedirect
message
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 AbstractRedirect
javax.mail.MessagingException
protected java.util.Collection getRecipients() throws javax.mail.MessagingException
AbstractRedirect
recipients
property.
Returns the collection of recipients of the new message,
or null if no change is requested.
Is a "getX()" method.
getRecipients
in class AbstractRedirect
recipients
init parameter or null if missing
javax.mail.MessagingException
protected javax.mail.internet.InternetAddress[] getTo() throws javax.mail.MessagingException
AbstractRedirect
to
property.
Returns the "To:" recipients of the new message.
or null if no change is requested.
Is a "getX()" method.
getTo
in class AbstractRedirect
javax.mail.MessagingException
protected MailAddress getReplyTo() throws javax.mail.MessagingException
AbstractRedirect
replyto
property.
Returns the Reply-To address of the new message,
or null if no change is requested.
Is a "getX()" method.
getReplyTo
in class AbstractRedirect
javax.mail.MessagingException
protected MailAddress getReversePath() throws javax.mail.MessagingException
AbstractRedirect
reversePath
property.
Returns the reverse-path of the new message,
or null if no change is requested.
Is a "getX()" method.
getReversePath
in class AbstractRedirect
javax.mail.MessagingException
protected MailAddress getSender() throws javax.mail.MessagingException
AbstractRedirect
sender
property.
Returns the new sender as a MailAddress,
or null if no change is requested.
Is a "getX()" method.
getSender
in class AbstractRedirect
javax.mail.MessagingException
protected java.lang.String getSubject() throws javax.mail.MessagingException
AbstractRedirect
subject
property.
Returns a string for the new message subject.
Is a "getX()" method.
getSubject
in class AbstractRedirect
javax.mail.MessagingException
protected java.lang.String getSubjectPrefix() throws javax.mail.MessagingException
AbstractRedirect
prefix
property.
Returns a prefix for the new message subject.
Is a "getX()" method.
getSubjectPrefix
in class AbstractRedirect
javax.mail.MessagingException
protected boolean attachError()
AbstractRedirect
attachError
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 AbstractRedirect
protected boolean isReply() throws javax.mail.MessagingException
AbstractRedirect
isReply
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 AbstractRedirect
javax.mail.MessagingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |