com.taggercat.util
Class SendMail

java.lang.Object
  extended by com.taggercat.util.SendMail

public class SendMail
extends java.lang.Object

General e-mail utilities.

 

Constructor Summary
SendMail()
           
 
Method Summary
static void sendMessage(java.lang.String to, java.lang.String from, java.lang.String subject, java.lang.String message)
           
static void sendMessage(java.lang.String to, java.lang.String from, java.lang.String subject, java.lang.String cc, java.lang.String bcc, java.lang.String mailhost, java.lang.String message, java.lang.String user, java.lang.String password)
          Sends an email message.
static void sendMessage(java.lang.String to, java.lang.String from, java.lang.String subject, java.lang.String cc, java.lang.String bcc, java.lang.String mailhost, java.lang.String message, java.lang.String user, java.lang.String password, boolean debug, boolean verbose, java.lang.String mailer)
          Sends an email message.
static void sendMessageAsync(java.lang.String to, java.lang.String from, java.lang.String subject, java.lang.String cc, java.lang.String bcc, java.lang.String mailhost, java.lang.String message, java.lang.String user, java.lang.String password)
          Sends an email message on its own thread.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SendMail

public SendMail()
Method Detail

sendMessageAsync

public static void sendMessageAsync(java.lang.String to,
                                    java.lang.String from,
                                    java.lang.String subject,
                                    java.lang.String cc,
                                    java.lang.String bcc,
                                    java.lang.String mailhost,
                                    java.lang.String message,
                                    java.lang.String user,
                                    java.lang.String password)
                             throws java.lang.Exception
Sends an email message on its own thread. Any errors are written to the error log.

Throws:
java.lang.Exception
Parameters:
to - the address to send to
from - the from address
subject - the subject of the email
cc - the cc list (optional)
bcc - the bcc list (optional)
mailhost - the email server hostname
message - the message text
user - the email server user name to authenticate with
password - the user password to authenticate with

sendMessage

public static void sendMessage(java.lang.String to,
                               java.lang.String from,
                               java.lang.String subject,
                               java.lang.String cc,
                               java.lang.String bcc,
                               java.lang.String mailhost,
                               java.lang.String message,
                               java.lang.String user,
                               java.lang.String password)
                        throws java.lang.Exception
Sends an email message.

Throws:
java.lang.Exception
Parameters:
to - the address to send to
from - the from address
subject - the subject of the email
cc - the cc list (optional)
bcc - the bcc list (optional)
mailhost - the email server hostname
message - the message text
user - the email server user name to authenticate with
password - the user password to authenticate with

sendMessage

public static void sendMessage(java.lang.String to,
                               java.lang.String from,
                               java.lang.String subject,
                               java.lang.String message)
                        throws java.lang.Exception
Throws:
java.lang.Exception

sendMessage

public static void sendMessage(java.lang.String to,
                               java.lang.String from,
                               java.lang.String subject,
                               java.lang.String cc,
                               java.lang.String bcc,
                               java.lang.String mailhost,
                               java.lang.String message,
                               java.lang.String user,
                               java.lang.String password,
                               boolean debug,
                               boolean verbose,
                               java.lang.String mailer)
                        throws java.lang.Exception
Sends an email message.

Throws:
java.lang.Exception
Parameters:
to - the address to send to
from - the from address
subject - the subject of the email
cc - the cc list (optional)
bcc - the bcc list (optional)
mailhost - the email server hostname
message - the message text
user - the email server user name to authenticate with
password - the user password to authenticate with
debug - set true to enable debug messages
verbose - set true to have verbose messages included in the log
mailer - the name set for the mailer