com.caucho.hemp.services
Class MailService

java.lang.Object
  extended by com.caucho.hemp.services.MailService

public class MailService
extends java.lang.Object

mail service


Constructor Summary
MailService()
           
 
Method Summary
 void addFrom(Address address)
          Adds a 'from' value
 void addTo(Address address)
          Adds a 'to' value
 Session getSession()
          Gets the mail session
 void init()
           
 void send(Message message)
          Sends to a mailbox
 void send(java.lang.String body)
          Sends to a mailbox
 void send(java.lang.String subject, java.lang.String body)
          Sends to a mailbox
 void sendWithAttachment(java.lang.String subject, java.lang.String textBody, java.lang.String attachmentType, java.lang.String attachmentName, java.io.InputStream is)
          Sends to a mailbox
 void setProperties(java.util.Properties props)
          Sets properties
 void setProperty(java.lang.String key, java.lang.String value)
          Sets a property
 void setSession(Session session)
          Sets the mail session
 void setSubject(java.lang.String subject)
          Sets the subject
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MailService

public MailService()
Method Detail

setSession

public void setSession(Session session)
Sets the mail session


getSession

public Session getSession()
Gets the mail session


addTo

public void addTo(Address address)
Adds a 'to' value


addFrom

public void addFrom(Address address)
Adds a 'from' value


setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)
Sets a property


setProperties

public void setProperties(java.util.Properties props)
Sets properties


setSubject

public void setSubject(java.lang.String subject)
Sets the subject


send

public void send(java.lang.String body)
Sends to a mailbox


send

public void send(java.lang.String subject,
                 java.lang.String body)
Sends to a mailbox


sendWithAttachment

public void sendWithAttachment(java.lang.String subject,
                               java.lang.String textBody,
                               java.lang.String attachmentType,
                               java.lang.String attachmentName,
                               java.io.InputStream is)
Sends to a mailbox


send

public void send(Message message)
Sends to a mailbox


init

public void init()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object