org.apache.james.transport.mailets
Class AddSubjectPrefix
java.lang.Object
org.apache.mailet.base.GenericMailet
org.apache.james.transport.mailets.AddSubjectPrefix
- All Implemented Interfaces:
- Mailet, MailetConfig
public class AddSubjectPrefix
- extends GenericMailet
Add an prefix (tag) to the subject of a message
Sample Configuration:
<mailet match="RecipientIs=robot@james.apache.org" class="TagMessage">
<subjectPrefix>[robot]</subjectPrefix> </mailet>
Method Summary |
java.lang.String |
getMailetInfo()
|
void |
init()
Initialize the mailet. |
void |
service(Mail mail)
Takes the message and adds a prefix to the subject |
Methods inherited from class org.apache.mailet.base.GenericMailet |
arrayToString, checkInitParameters, destroy, getInitParameter, 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 |
AddSubjectPrefix
public AddSubjectPrefix()
init
public void init()
throws javax.mail.MessagingException
- Initialize the mailet.
- Overrides:
init
in class GenericMailet
- Throws:
javax.mail.MessagingException
service
public void service(Mail mail)
throws javax.mail.MessagingException
- Takes the message and adds a prefix to the subject
- Specified by:
service
in interface Mailet
- Specified by:
service
in class GenericMailet
- Parameters:
mail
- the mail being processed
- Throws:
javax.mail.MessagingException
- if an error arises during message processing
getMailetInfo
public java.lang.String getMailetInfo()
- Specified by:
getMailetInfo
in interface Mailet
- Overrides:
getMailetInfo
in class GenericMailet
Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.