Methods Summary |
---|
protected boolean | attachError()
return false;
|
protected java.lang.String[] | getAllowedInitParameters()Gets the expected init parameters.
String[] allowedArray = {
// "static",
"debug",
"passThrough",
"fakeDomainCheck",
"forwardto",
"forwardTo"
};
return allowedArray;
|
protected int | getAttachmentType()
return NONE;
|
protected int | getInLineType()
return UNALTERED;
|
public java.lang.String | getMailetInfo()Return a string describing this mailet.
return "Forward Mailet";
|
protected java.lang.String | getMessage()
return "";
|
protected java.util.Collection | getRecipients()
Collection newRecipients = new HashSet();
String addressList = getInitParameter("forwardto",getInitParameter("forwardTo"));
// if nothing was specified, throw an exception
if (addressList == null) {
throw new MessagingException("Failed to initialize \"recipients\" list: no <forwardTo> or <forwardto> init parameter found");
}
try {
InternetAddress[] iaarray = InternetAddress.parse(addressList, false);
for (int i = 0; i < iaarray.length; i++) {
String addressString = iaarray[i].getAddress();
MailAddress specialAddress = getSpecialAddress(addressString,
new String[] {"postmaster", "sender", "from", "replyTo", "reversePath", "unaltered", "recipients", "to", "null"});
if (specialAddress != null) {
newRecipients.add(specialAddress);
} else {
newRecipients.add(new MailAddress(iaarray[i]));
}
}
} catch (Exception e) {
throw new MessagingException("Exception thrown in getRecipients() parsing: " + addressList, e);
}
if (newRecipients.size() == 0) {
throw new MessagingException("Failed to initialize \"recipients\" list; empty <recipients> init parameter found.");
}
return newRecipients;
|
protected org.apache.mailet.MailAddress | getReplyTo()
return null;
|
protected org.apache.mailet.MailAddress | getReversePath()
return null;
|
protected org.apache.mailet.MailAddress | getSender()
return null;
|
protected java.lang.String | getSubject()
return null;
|
protected java.lang.String | getSubjectPrefix()
return null;
|
protected javax.mail.internet.InternetAddress[] | getTo()
return null;
|
protected boolean | isReply()
return false;
|