Methods Summary |
---|
public void | bounce(Mail mail, java.lang.String message)Bounces the message using a standard format with the given message.
The message will be sent back to the sender from the postmaster as specified for
this mailet context, adding message to top of mail server queue using
sendMail().
|
public void | bounce(Mail mail, java.lang.String message, MailAddress bouncer)Bounces the email message using the provided email address as the
sender of the bounce.
|
public java.lang.Object | getAttribute(java.lang.String name)Returns the mailet container attribute with the given name, or null
if there is no attribute by that name. An attribute allows a mailet container
to give the mailet additional information not already provided by this interface.
See your server documentation for information about its attributes. A list of
supported attributes can be retrieved using getAttributeNames.
The attribute is returned as a java.lang.Object or some subclass. Attribute
names should follow the same convention as package names. The Java Mailet API
specification reserves names matching java.*, javax.*, and sun.*
|
public java.util.Iterator | getAttributeNames()Returns an Iterator containing the attribute names available within
this mailet context. Use the getAttribute(java.lang.String) method with an
attribute name to get the value of an attribute.
|
public java.util.Collection | getMailServers(java.lang.String host)Returns a Collection of Strings of hostnames or ip addresses that
are specified as mail server listeners for the given hostname.
This is done using MX records, and the hostnames or ip addresses
are returned sorted by MX priority.
|
public int | getMajorVersion()Returns the major version of the Mailet API that this mailet
container supports. All implementations that comply with Version 1.2 must have
this method return the integer 1.
|
public int | getMinorVersion()Returns the minor version of the Mailet API that this mailet
container supports. All implementations that comply with Version 1.2 must have
this method return the integer 2.
|
public MailAddress | getPostmaster()Returns the postmaster's address for this mailet context.
|
public java.util.Iterator | getSMTPHostAddresses(java.lang.String domainName)Returns an Iterator over HostAddress, a specialized subclass of
javax.mail.URLName, which provides location information for
servers that are specified as mail handlers for the given
hostname. This is done using MX records, and the HostAddress
instances are returned sorted by MX priority. If no host is
found for domainName, the Iterator returned will be empty and the
first call to hasNext() will return false.
|
public java.lang.String | getServerInfo()Returns the name and version of the mailet container on which
the mailet is running.
The form of the returned string is servername/versionnumber. For example,
JAMES may return the string JAMES/1.2.
The mailet container may return other optional information after the primary
string in parentheses, for example, JAMES/1.2 (JDK 1.3.0; Windows NT 4.0 x86).
|
public boolean | isLocalServer(java.lang.String serverName)Checks if a server is serviced by mail context
|
public boolean | isLocalUser(java.lang.String userAccount)Checks if a user account is exists in the mail context.
|
public void | log(java.lang.String message)Writes the specified message to a mailet log file, usually an event
log. The name and type of the mailet log file is specific to the mailet
container.
|
public void | log(java.lang.String message, java.lang.Throwable t)Writes an explanatory message and a stack trace for a given Throwable
exception to the mailet log file.
|
public void | removeAttribute(java.lang.String name)Removes the attribute with the given name from the mailet context. After
removal, subsequent calls to getAttribute(java.lang.String) to retrieve
the attribute's value will return null.
|
public void | sendMail(javax.mail.internet.MimeMessage msg)Send an outgoing message to the top of this mailet container's root queue.
This is the equivalent of opening an SMTP session to localhost.
This uses sender and recipients as specified in the message itself.
|
public void | sendMail(MailAddress sender, java.util.Collection recipients, javax.mail.internet.MimeMessage msg)Send an outgoing message to the top of this mailet container's root queue.
This is the equivalent of opening an SMTP session to localhost.
|
public void | sendMail(MailAddress sender, java.util.Collection recipients, javax.mail.internet.MimeMessage msg, java.lang.String state)Send an outgoing message to the top of this mailet container queue for the
appropriate processor that is specified.
|
public void | sendMail(Mail mail)Send an outgoing message to the top of this mailet container's root queue.
This is the equivalent of opening an SMTP session to localhost.
The Mail object provides all envelope and content information
|
public void | setAttribute(java.lang.String name, java.lang.Object object)Binds an object to a given attribute name in this mailet context. If the name
specified is already used for an attribute, this method will remove the old
attribute and bind the name to the new attribute.
Attribute names should follow the same convention as package names. The Java
Mailet API specification reserves names matching java.*, javax.*, and sun.*.
|
public void | storeMail(MailAddress sender, MailAddress recipient, javax.mail.internet.MimeMessage msg)Stores the message is in the local repository associated with
recipient for later retrieval, e.g., by a POP3 or IMAP service.
|