anderix.mail
Class EmailMessage

java.lang.Object
  extended by anderix.mail.EmailMessage

public class EmailMessage
extends java.lang.Object


Constructor Summary
EmailMessage(java.lang.String smtpHost, int smtpPort, java.lang.String smtpUser, java.lang.String smtpPassword)
           
EmailMessage(java.lang.String smtpHost, java.lang.String smtpUser, java.lang.String smtpPassword)
           
 
Method Summary
 void addBCC(java.lang.String email)
           
 void addBCC(java.lang.String name, java.lang.String email)
           
 void addCC(java.lang.String email)
           
 void addCC(java.lang.String name, java.lang.String email)
           
 void addTo(java.lang.String email)
           
 void addTo(java.lang.String name, java.lang.String email)
           
 void attach(java.io.File file)
           
 void send()
           
 void send(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String text)
           
 void send(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String text, java.io.File attachment)
           
 void setFrom(java.lang.String email)
           
 void setFrom(java.lang.String name, java.lang.String email)
           
 void setSubject(java.lang.String subject)
           
 void setText(java.lang.String text)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmailMessage

public EmailMessage(java.lang.String smtpHost,
                    java.lang.String smtpUser,
                    java.lang.String smtpPassword)

EmailMessage

public EmailMessage(java.lang.String smtpHost,
                    int smtpPort,
                    java.lang.String smtpUser,
                    java.lang.String smtpPassword)
Method Detail

setFrom

public void setFrom(java.lang.String name,
                    java.lang.String email)
             throws javax.mail.internet.AddressException
Throws:
javax.mail.internet.AddressException

setFrom

public void setFrom(java.lang.String email)
             throws javax.mail.internet.AddressException
Throws:
javax.mail.internet.AddressException

addTo

public void addTo(java.lang.String name,
                  java.lang.String email)
           throws javax.mail.internet.AddressException
Throws:
javax.mail.internet.AddressException

addTo

public void addTo(java.lang.String email)
           throws javax.mail.internet.AddressException
Throws:
javax.mail.internet.AddressException

addCC

public void addCC(java.lang.String name,
                  java.lang.String email)
           throws javax.mail.internet.AddressException
Throws:
javax.mail.internet.AddressException

addCC

public void addCC(java.lang.String email)
           throws javax.mail.internet.AddressException
Throws:
javax.mail.internet.AddressException

addBCC

public void addBCC(java.lang.String name,
                   java.lang.String email)
            throws javax.mail.internet.AddressException
Throws:
javax.mail.internet.AddressException

addBCC

public void addBCC(java.lang.String email)
            throws javax.mail.internet.AddressException
Throws:
javax.mail.internet.AddressException

setSubject

public void setSubject(java.lang.String subject)

setText

public void setText(java.lang.String text)

attach

public void attach(java.io.File file)

send

public void send()
          throws javax.mail.MessagingException,
                 java.io.IOException
Throws:
javax.mail.MessagingException
java.io.IOException

send

public void send(java.lang.String from,
                 java.lang.String to,
                 java.lang.String subject,
                 java.lang.String text)
          throws javax.mail.MessagingException,
                 java.io.IOException
Throws:
javax.mail.MessagingException
java.io.IOException

send

public void send(java.lang.String from,
                 java.lang.String to,
                 java.lang.String subject,
                 java.lang.String text,
                 java.io.File attachment)
          throws javax.mail.MessagingException,
                 java.io.IOException
Throws:
javax.mail.MessagingException
java.io.IOException