com.hs.mail.mailet
Class DefaultMailetContext

java.lang.Object
  extended by com.hs.mail.mailet.DefaultMailetContext
All Implemented Interfaces:
MailetContext

public class DefaultMailetContext
extends Object
implements MailetContext


Constructor Summary
DefaultMailetContext()
           
 
Method Summary
 MailboxManager getMailboxManager()
           
 UserManager getUserManager()
           
 void sendMail(String sender, String[] recipients, SmtpMessage msg)
          Send an outgoing message to the top of this mailet container's root queue.
 void setMailboxManager(MailboxManager manager)
           
 void setUserManager(UserManager manager)
           
 void storeMail(long soleRecipientID, String destination, SmtpMessage msg)
          Stores the message in the target folder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMailetContext

public DefaultMailetContext()
Method Detail

getMailboxManager

public MailboxManager getMailboxManager()
Specified by:
getMailboxManager in interface MailetContext
Returns:

setMailboxManager

public void setMailboxManager(MailboxManager manager)

getUserManager

public UserManager getUserManager()
Specified by:
getUserManager in interface MailetContext
Returns:

setUserManager

public void setUserManager(UserManager manager)

sendMail

public void sendMail(String sender,
                     String[] recipients,
                     SmtpMessage msg)
              throws IOException
Description copied from interface: MailetContext
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.

Specified by:
sendMail in interface MailetContext
Parameters:
sender - the sender of the message
recipients - an Array of mail addresses of recipients
msg - the SmtpMessage of the headers and body content of the outgoing message
Throws:
IOException

storeMail

public void storeMail(long soleRecipientID,
                      String destination,
                      SmtpMessage msg)
               throws IOException
Description copied from interface: MailetContext
Stores the message in the target folder.

Specified by:
storeMail in interface MailetContext
destination - the destination folder where this message will be stored
msg - the SmtpMessage to store in a local mailbox
Throws:
IOException


Copyright © 2011. All Rights Reserved.