buttress.util
Class Email

java.lang.Object
  extended bybuttress.util.Email

public class Email
extends java.lang.Object


Constructor Summary
Email(java.lang.String[] recipients, java.lang.String subject, java.lang.String message, java.lang.String from)
          Constructor
 
Method Summary
static boolean isSendEmail()
           
 void send()
          sends the email message
static void setSendEmail(boolean sendEmail)
           
 java.lang.String toString()
          prints a basic to string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Email

public Email(java.lang.String[] recipients,
             java.lang.String subject,
             java.lang.String message,
             java.lang.String from)
Constructor

Parameters:
recipients - list of email address to send to
subject - subject of the email
message - body of the email
from - address of user, this will be wrong
Method Detail

toString

public java.lang.String toString()
prints a basic to string

Returns:
the details of the email

send

public void send()
          throws javax.mail.MessagingException
sends the email message

Throws:
javax.mail.MessagingException - error for the email

isSendEmail

public static boolean isSendEmail()
Returns:
Returns whether or not the user will let us send mail

setSendEmail

public static void setSendEmail(boolean sendEmail)
Parameters:
sendEmail - set whether or not we can send mail