org.apache.servlet.mail
Interface MailServletResponse


public abstract interface MailServletResponse
extends javax.servlet.ServletResponse

This interface is used by the mail servlet to send the generated mail message.

The mail servlet writer must call the methods defined in this interface before calling the methods of the superclass ServletResponse.

While methods in this interface are used to encapsulate the message body with the proper mail information (such as sender and recipient), the methods inherited from ServletResponse are used to generate and qualify the message body.

If the methods are not called, the default behavior of each method is to clone exising fields found in the MailServletRequest. Therefore only modified fields need to be updated by the mail servlet.

Version:
pre-draft 1.0 (submitted for review)
Author:
Stefano Mazzocchi , Pierpaolo Fumagalli

Method Summary
 void setHeaders(MailHeaders headers)
          Sets the mail headers passing a MailHeaders container.
 void setRecipient(MailAddress recipient)
          Sets a single recipient of the processed mail massage.
 void setRecipients(MailAddress[] recipients)
          Sets the recipients of the processed mail massage, showing the complete list of recipients in the message.
 void setRecipients(MailAddress[] recipients, boolean showList)
          Sets the recipients of the processed mail massage, indicating if the list of recipients is shown.
 void setSender(MailAddress sender)
          Sets the fully qualified mail address of the sender.
 
Methods inherited from interface javax.servlet.ServletResponse
getCharacterEncoding, getOutputStream, getWriter, setContentLength, setContentType
 

Method Detail

setSender

public void setSender(MailAddress sender)
Sets the fully qualified mail address of the sender.
See Also:
org.apache.mail.servlet.MailAddress

setRecipient

public void setRecipient(MailAddress recipient)
Sets a single recipient of the processed mail massage.
See Also:
org.apache.mail.servlet.MailAddress

setRecipients

public void setRecipients(MailAddress[] recipients)
Sets the recipients of the processed mail massage, showing the complete list of recipients in the message.
See Also:
org.apache.mail.servlet.MailAddress

setRecipients

public void setRecipients(MailAddress[] recipients,
                          boolean showList)
Sets the recipients of the processed mail massage, indicating if the list of recipients is shown. Setting showList to false, forces the servlet engine to remove the other recipients: every message shows only the recipient actually receiving the mail.
See Also:
org.apache.mail.servlet.MailAddress

setHeaders

public void setHeaders(MailHeaders headers)
Sets the mail headers passing a MailHeaders container.
See Also:
MailHeaders