net.sf.borg.common
Class SendJavaMail

java.lang.Object
  extended by net.sf.borg.common.SendJavaMail

public class SendJavaMail
extends Object

utility class to send out email via java mail


Constructor Summary
SendJavaMail()
           
 
Method Summary
static void sendMail(String host, String msgText, String subject, String from, String to, String user, String pass)
          Send an mail.
static void sendMailWithAttachments(String host, String msgText, String subject, String from, String to, String user, String pass, String[] attachments)
          Send a multipart mime email with attachments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SendJavaMail

public SendJavaMail()
Method Detail

sendMail

public static void sendMail(String host,
                            String msgText,
                            String subject,
                            String from,
                            String to,
                            String user,
                            String pass)
                     throws Exception
Send an mail.

Parameters:
host - the smtp host
msgText - the email text
subject - the subject
from - the from address
to - the to address
user - the smtp user
pass - the smtp password
Throws:
Exception - the exception

sendMailWithAttachments

public static void sendMailWithAttachments(String host,
                                           String msgText,
                                           String subject,
                                           String from,
                                           String to,
                                           String user,
                                           String pass,
                                           String[] attachments)
                                    throws Exception
Send a multipart mime email with attachments

Parameters:
host - the smtp host
msgText - the email text
subject - the subject
from - the from address
to - the to address
user - the smtp user
pass - the smtp password
attachments - array of filenames to attach
Throws:
Exception - the exception


Generated December 30 2011 by mbb using Apache Ant(TM) version 1.8.2 compiled on December 20 2010 and Java version 1.6.0_30 from Sun Microsystems Inc. on Linux i386 3.0.0-14-generic-pae