org.infoglue.cms.util.mail
Class MailService

java.lang.Object
  extended by org.infoglue.cms.util.mail.MailService

public class MailService
extends java.lang.Object


Constructor Summary
MailService(javax.mail.Session session)
          Creates a MailServices object and initializes it with the specified mail session.
 
Method Summary
 javax.mail.internet.MimeMessage createMessage()
           
 void send(javax.mail.Message message)
           
 void send(java.lang.String from, java.lang.String to, java.lang.String bcc, java.lang.String subject, java.lang.String content)
           
 void send(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String content, java.lang.String contentType, java.lang.String encoding)
           
 void sendEmail(java.lang.String from, java.lang.String to, java.lang.String bcc, java.lang.String subject, java.lang.String content, java.lang.String encoding)
           
 void sendHTML(java.lang.String from, java.lang.String to, java.lang.String bcc, java.lang.String subject, java.lang.String content, java.lang.String encoding)
           
 void sendPlain(java.lang.String from, java.lang.String to, java.lang.String bcc, java.lang.String subject, java.lang.String content, java.lang.String encoding)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailService

public MailService(javax.mail.Session session)
Creates a MailServices object and initializes it with the specified mail session.

Method Detail

createMessage

public javax.mail.internet.MimeMessage createMessage()

send

public void send(javax.mail.Message message)
          throws SystemException
Throws:
SystemException

send

public void send(java.lang.String from,
                 java.lang.String to,
                 java.lang.String bcc,
                 java.lang.String subject,
                 java.lang.String content)
          throws SystemException
Parameters:
from - the sender of the email.
to - the recipient of the email.
subject - the subject of the email.
content - the body of the email.
Throws:
SystemException - if the email couldn't be sent due to some mail server exception.

send

public void send(java.lang.String from,
                 java.lang.String to,
                 java.lang.String subject,
                 java.lang.String content,
                 java.lang.String contentType,
                 java.lang.String encoding)
          throws SystemException
Parameters:
from - the sender of the email.
to - the recipient of the email.
subject - the subject of the email.
content - the body of the email.
Throws:
SystemException - if the email couldn't be sent due to some mail server exception.

sendEmail

public void sendEmail(java.lang.String from,
                      java.lang.String to,
                      java.lang.String bcc,
                      java.lang.String subject,
                      java.lang.String content,
                      java.lang.String encoding)
               throws SystemException
Parameters:
from - the sender of the email.
to - the recipient of the email.
subject - the subject of the email.
content - the body of the email.
Throws:
SystemException - if the email couldn't be sent due to some mail server exception.

sendHTML

public void sendHTML(java.lang.String from,
                     java.lang.String to,
                     java.lang.String bcc,
                     java.lang.String subject,
                     java.lang.String content,
                     java.lang.String encoding)
              throws SystemException
Parameters:
from - the sender of the email.
to - the recipient of the email.
subject - the subject of the email.
content - the body of the email.
Throws:
SystemException - if the email couldn't be sent due to some mail server exception.

sendPlain

public void sendPlain(java.lang.String from,
                      java.lang.String to,
                      java.lang.String bcc,
                      java.lang.String subject,
                      java.lang.String content,
                      java.lang.String encoding)
               throws SystemException
Parameters:
from - the sender of the email.
to - the recipient of the email.
subject - the subject of the email.
content - the body of the email.
Throws:
SystemException - if the email couldn't be sent due to some mail server exception.


Copyright © 2005 InfoGlue.org All Rights Reserved.