|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mailet.GenericMailet
org.apache.james.transport.mailets.AbstractRedirect
org.apache.james.transport.mailets.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 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 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 MailAddress |
getReplyTo()
Gets the replyto property.
|
protected MailAddress |
getReversePath()
Gets the reversePath property.
|
protected MailAddress |
getSender()
Gets the sender property.
|
protected String |
getSubject()
Gets the subject property.
|
protected String |
getSubjectPrefix()
Gets the prefix property.
|
protected 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 String getMailetInfo()
getMailetInfo
in interface Mailet
getMailetInfo
in class GenericMailet
protected String[] getAllowedInitParameters()
getAllowedInitParameters
in class AbstractRedirect
protected int getInLineType() throws 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
MessagingException
protected int getAttachmentType() throws 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
MessagingException
protected String getMessage() throws 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
MessagingException
protected Collection getRecipients() throws 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
MessagingException
protected InternetAddress[] getTo() throws 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
MessagingException
protected MailAddress getReplyTo() throws 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
MessagingException
protected MailAddress getReversePath() throws 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
MessagingException
protected MailAddress getSender() throws 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
MessagingException
protected String getSubject() throws MessagingException
AbstractRedirect
subject
property.
Returns a string for the new message subject.
Is a "getX()" method.
getSubject
in class AbstractRedirect
MessagingException
protected String getSubjectPrefix() throws MessagingException
AbstractRedirect
prefix
property.
Returns a prefix for the new message subject.
Is a "getX()" method.
getSubjectPrefix
in class AbstractRedirect
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 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
MessagingException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |