net.sf.borg.common
Class SendJavaMail
java.lang.Object
net.sf.borg.common.SendJavaMail
public class SendJavaMail
- extends Object
utility class to send out email via java mail
|
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 |
SendJavaMail
public SendJavaMail()
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 hostmsgText - the email textsubject - the subjectfrom - the from addressto - the to addressuser - the smtp userpass - 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 hostmsgText - the email textsubject - the subjectfrom - the from addressto - the to addressuser - the smtp userpass - the smtp passwordattachments - 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