org.jaffa.util
Class EmailHelper
java.lang.Object
   org.jaffa.util.EmailHelper
org.jaffa.util.EmailHelper
- public class EmailHelper- extends Object
Routines for sending emails, with Microsoft Excel Attachements
- Since:
- 1.3
- Version:
- 1.0
- Author:
- PaulE
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
EmailHelper
public EmailHelper()
emailExcel
public static void emailExcel(String smtpHost,
                              String smtpLocalhost,
                              String smtpUser,
                              String smtpPass,
                              String from,
                              String[] to,
                              String subject,
                              String bodyText,
                              TableModel excelData)
                       throws MessagingException
- Sends an email with an Excel spreadsheet as an attachment
 
- 
- Parameters:
- smtpLocalhost- (Optional) Name of host sending message, used in the HELO message for
 server authentication
- smtpUser- (Optional) User name to authenticate to mail server. Not needed if server
 is an 'open relay'
- smtpPass- (Optional) Password to authenticate to mail server. Not needed if server
 is an 'open relay'
- smtpHost- (REQUIRED) name of mail server ie mail.yahoo.com
- from- (REQUIRED) from email ie paul@yahoo.com
- to- (REQUIRED) array of strings to send email to ie bob@yahoo.com
- subject- Text for the email subject (defaults to 'No Subject' if null)
- bodyText- Text for the main mail's body, in addition to the attachment
- excelData- Data to convert to spread sheet. Mkae sure to specify 'String' as a datatype on columns that
 excel should not auto format
- Throws:
- MessagingException- Contains error if message could not be sent
 
Copyright © 2002-2004 JAFFA Project.