com.mizar.faces.javax.utils
Class MailFactory

java.lang.Object
  extended by com.mizar.faces.javax.utils.MailFactory

public class MailFactory
extends java.lang.Object


Constructor Summary
MailFactory()
           
MailFactory(java.lang.String toEmail, java.lang.String toName)
           
MailFactory(java.lang.String toEmail, java.lang.String toName, java.lang.String subject, java.lang.String text)
           
MailFactory(User recipient)
           
MailFactory(User recipient, java.lang.String subject, java.lang.String text)
           
 
Method Summary
 javax.mail.internet.MimeMessage createMimeMessage()
           
static javax.mail.internet.MimeMessage createMimeMessage(java.lang.String toEmail, java.lang.String toName)
           
static javax.mail.internet.MimeMessage createMimeMessage(java.lang.String toEmail, java.lang.String toName, java.lang.String subject, java.lang.String text)
           
static javax.mail.internet.MimeMessage createMimeMessage(User recipient)
           
static javax.mail.internet.MimeMessage createMimeMessage(User recipient, java.lang.String toEmail, java.lang.String toName)
           
 java.lang.String getFromEmail()
           
 java.lang.String getFromName()
           
 javax.mail.internet.MimeMessage getMimeMessage()
           
 User getRecipient()
           
 java.lang.String getSubject()
           
 java.lang.String getText()
           
 java.lang.String getToEmail()
           
 java.lang.String getToName()
           
 boolean isDebug()
           
 void sendEmail()
           
static void sendEmail(javax.mail.internet.MimeMessage mimeMessage)
           
 void setDebug(boolean debug)
           
 void setMimeMessage(javax.mail.internet.MimeMessage mimeMessage)
           
 void setRecipient(User user)
           
 void setSubject(java.lang.String subject)
           
 void setText(java.lang.String text)
           
 void setToEmail(java.lang.String toEmail)
           
 void setToName(java.lang.String toName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailFactory

public MailFactory()

MailFactory

public MailFactory(User recipient)

MailFactory

public MailFactory(java.lang.String toEmail,
                   java.lang.String toName)

MailFactory

public MailFactory(User recipient,
                   java.lang.String subject,
                   java.lang.String text)

MailFactory

public MailFactory(java.lang.String toEmail,
                   java.lang.String toName,
                   java.lang.String subject,
                   java.lang.String text)
Method Detail

createMimeMessage

public static javax.mail.internet.MimeMessage createMimeMessage(User recipient)
                                                         throws java.io.UnsupportedEncodingException,
                                                                javax.mail.MessagingException
Throws:
java.io.UnsupportedEncodingException
javax.mail.MessagingException

createMimeMessage

public static javax.mail.internet.MimeMessage createMimeMessage(User recipient,
                                                                java.lang.String toEmail,
                                                                java.lang.String toName)
                                                         throws java.io.UnsupportedEncodingException,
                                                                javax.mail.MessagingException
Throws:
java.io.UnsupportedEncodingException
javax.mail.MessagingException

createMimeMessage

public static javax.mail.internet.MimeMessage createMimeMessage(java.lang.String toEmail,
                                                                java.lang.String toName)
                                                         throws java.io.UnsupportedEncodingException,
                                                                javax.mail.MessagingException
Throws:
java.io.UnsupportedEncodingException
javax.mail.MessagingException

createMimeMessage

public static javax.mail.internet.MimeMessage createMimeMessage(java.lang.String toEmail,
                                                                java.lang.String toName,
                                                                java.lang.String subject,
                                                                java.lang.String text)
                                                         throws java.io.UnsupportedEncodingException,
                                                                javax.mail.MessagingException
Throws:
java.io.UnsupportedEncodingException
javax.mail.MessagingException

createMimeMessage

public javax.mail.internet.MimeMessage createMimeMessage()
                                                  throws java.io.UnsupportedEncodingException,
                                                         javax.mail.MessagingException
Throws:
java.io.UnsupportedEncodingException
javax.mail.MessagingException

sendEmail

public static void sendEmail(javax.mail.internet.MimeMessage mimeMessage)
                      throws javax.mail.MessagingException
Throws:
javax.mail.MessagingException

sendEmail

public void sendEmail()
               throws javax.mail.NoSuchProviderException,
                      javax.mail.MessagingException
Throws:
javax.mail.NoSuchProviderException
javax.mail.MessagingException

getFromEmail

public java.lang.String getFromEmail()

getFromName

public java.lang.String getFromName()

setRecipient

public void setRecipient(User user)

getRecipient

public User getRecipient()

setToEmail

public void setToEmail(java.lang.String toEmail)

getToEmail

public java.lang.String getToEmail()

setToName

public void setToName(java.lang.String toName)

getToName

public java.lang.String getToName()

setSubject

public void setSubject(java.lang.String subject)

getSubject

public java.lang.String getSubject()

setText

public void setText(java.lang.String text)

getText

public java.lang.String getText()

setMimeMessage

public void setMimeMessage(javax.mail.internet.MimeMessage mimeMessage)

getMimeMessage

public javax.mail.internet.MimeMessage getMimeMessage()

setDebug

public void setDebug(boolean debug)

isDebug

public boolean isDebug()