| java.lang.Object com.nabhinc.util.EmailUtil
EmailUtil | public class EmailUtil (Code) | | Send Email utility class.
author: Padmanabh Dabke author: (c) 2003 Nabh Information Systems, Inc. All Rights Reserved. |
Method Summary | |
public static void | send(String from, String to, String subject, String body) Send a plain text email. | public static void | send(String from, String to, String subject, String body, String contentType) Send an email in format specified in the content's type. | public static void | send(String from, Vector toList, String subject, String body) Send a plain text email to a list of email addresses. | public static void | send(String from, Vector toList, String subject, String body, String filePath, String fileName) Send a plain text email with an attachment to a list of email addresses.
If filePath or fileName is null, only plain text email without attachment
will be sent. | public static void | send(String from, Vector toList, String subject, String body, String filePath, String fileName, String contentType) Send a plain text email with an attachment to a list of email addresses.
If filePath or fileName is null, only plain text email without attachment
will be sent. |
SMTP_HOST_PROPERTY | final public static String SMTP_HOST_PROPERTY(Code) | | |
SMTP_PASSWORD_PROPERTY | final public static String SMTP_PASSWORD_PROPERTY(Code) | | |
SMTP_USER_PROPERTY | final public static String SMTP_USER_PROPERTY(Code) | | |
send | public static void send(String from, String to, String subject, String body) throws AddressException, MessagingException(Code) | | Send a plain text email. If the body contains non US-ASCII characters,
it will be encoded using platform's default charset.
If more than one email addresses to be sent to, separate
the addresses with comma.
Parameters: from - The Sender email address. Parameters: to - A comma separated recipient email address(es). Parameters: subject - The subject of the email. Parameters: body - The email body/message. throws: AddressException - Thrown if the sender or recipient email address is invalid format throws: MessagingException - |
send | public static void send(String from, String to, String subject, String body, String contentType) throws AddressException, MessagingException(Code) | | Send an email in format specified in the content's type.
Plain text is assumed if contentType is null.
If more than one email addresses to be sent to, separate
the addresses with comma.
If the body contains non US-ASCII characters,
it will be encoded using platform's default charset.
Parameters: from - The Sender email address. Parameters: to - A comma separated of recipient email address(es). Parameters: subject - The subject of the email. Parameters: body - The email message body. Parameters: contentType - Mime type of message body, i.e. text/html, text/plain, application/x-xxxxx. Default is text/plain. throws: AddressException - throws: MessagingException - |
send | public static void send(String from, Vector toList, String subject, String body) throws AddressException, MessagingException(Code) | | Send a plain text email to a list of email addresses.
If the body contains non US-ASCII characters,
it will be encoded using platform's default charset.
Parameters: from - The Sender email address. Parameters: toList - Vector of email addresses Parameters: subject - Email subject Parameters: body - Email message body throws: AddressException - throws: MessagingException - |
send | public static void send(String from, Vector toList, String subject, String body, String filePath, String fileName) throws AddressException, MessagingException(Code) | | Send a plain text email with an attachment to a list of email addresses.
If filePath or fileName is null, only plain text email without attachment
will be sent. If the body contains non US-ASCII characters,
it will be encoded using platform's default charset.
Parameters: from - The Sender email address. Parameters: toList - Vector of email addresses. Parameters: subject - Email subject. Parameters: body - Email message body. Parameters: filePath - Path to the file to be attached. Parameters: fileName - The file's name to be attached. throws: AddressException - throws: MessagingException - |
send | public static void send(String from, Vector toList, String subject, String body, String filePath, String fileName, String contentType) throws AddressException, MessagingException(Code) | | Send a plain text email with an attachment to a list of email addresses.
If filePath or fileName is null, only plain text email without attachment
will be sent. If the body contains non US-ASCII characters,
it will be encoded using platform's default charset.
Parameters: from - The Sender email address. Parameters: toList - Vector of email addresses. Parameters: subject - Email subject. Parameters: body - Email message body. Parameters: filePath - Path to the file to be attached. Parameters: fileName - The file's name to be attached. Parameters: contentType - Mime type of message body, i.e. text/html, text/plain, application/x-xxxxx. Default is text/plain. throws: AddressException - throws: MessagingException - |
|
|