|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.nds.dirxml.util.mail.SendMail
public class SendMail
A class to generate email notifications
Nested Class Summary | |
---|---|
static class |
SendMail.EmailAddress
|
Constructor Summary | |
---|---|
SendMail()
|
Method Summary | |
---|---|
static byte[] |
encodeHTML(String input,
String encoding)
encode a string containing HTML to a byte array |
static void |
generateEMail(String sGateway,
String sFrom,
String sReply,
SendMail.EmailAddress[] toAddrs,
String sSubject,
String sMessage,
String sUserID,
String sPassword,
String sEncoding,
boolean bHtml)
generate an email with the given recipients and parameters |
static void |
generateEMail(String sGateway,
String sFrom,
String sReply,
SendMail.EmailAddress[] toAddrs,
String sSubject,
String sMessage,
String sUserID,
String sPassword,
String sEncoding,
List customHeaders,
boolean bHtml)
generate an email with the given recipients and parameters |
static void |
generateEMailFromTemplate(String sFrom,
String sReply,
SendMail.EmailAddress[] toAddrs,
String sSubject,
String sMsgTemplate,
String sGateway,
String sUserID,
String sPassword,
String sEncoding,
Map hReplacementData,
boolean bHtml)
generate an email with the given recipients and parameters |
static void |
generateEMailFromTemplate(String sFrom,
String sReply,
SendMail.EmailAddress[] toAddrs,
String sSubject,
String sMsgTemplate,
String sGateway,
String sUserID,
String sPassword,
String sEncoding,
Map hReplacementData,
List customHeaders,
boolean bHtml)
generate an email with the given recipients and parameters |
protected static String |
simpleReplaceData(String value,
Map hReplacementData)
simple data replacement against a string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SendMail()
Method Detail |
---|
public static void generateEMail(String sGateway, String sFrom, String sReply, SendMail.EmailAddress[] toAddrs, String sSubject, String sMessage, String sUserID, String sPassword, String sEncoding, boolean bHtml) throws Exception
sGateway
- the SMTP serversFrom
- the SMTP from addresssReply
- the SMTP reply-to addresstoAddrs
- array of recipient addresses and typessSubject
- the email subjectsMessage
- the email messagesUserID
- the SMTP user's accountsPassword
- the SMTP user's passwordsEncoding
- encoding to use for message and subject (may be null)bHtml
- flag to send message as plain text or HTML
Exception
public static void generateEMail(String sGateway, String sFrom, String sReply, SendMail.EmailAddress[] toAddrs, String sSubject, String sMessage, String sUserID, String sPassword, String sEncoding, List customHeaders, boolean bHtml) throws Exception
sGateway
- the SMTP serversFrom
- the SMTP from addresssReply
- the SMTP reply-to addresstoAddrs
- array of recipient addresses and typessSubject
- the email subjectsMessage
- the email messagesUserID
- the SMTP user's accountsPassword
- the SMTP user's passwordsEncoding
- encoding to use for message and subject (may be null)customHeaders
- an List of Strings, each string containing a custom SMTP header line (may be null)bHtml
- flag to send message as plain text or HTML
Exception
public static void generateEMailFromTemplate(String sFrom, String sReply, SendMail.EmailAddress[] toAddrs, String sSubject, String sMsgTemplate, String sGateway, String sUserID, String sPassword, String sEncoding, Map hReplacementData, boolean bHtml) throws Exception
sFrom
- the SMTP from addresssReply
- the SMTP reply-to addresstoAddrs
- array of recipient addresses and typessSubject
- the email subjectsMsgTemplate
- the email message templatesGateway
- the SMTP serversUserID
- the SMTP user's accountsPassword
- the SMTP user's passwordsEncoding
- encoding to use for message and subject (may be null)hReplacementData
- Map
containing replacement data key/value pairsbHtml
- flag to send message as plain text or HTML
Exception
public static void generateEMailFromTemplate(String sFrom, String sReply, SendMail.EmailAddress[] toAddrs, String sSubject, String sMsgTemplate, String sGateway, String sUserID, String sPassword, String sEncoding, Map hReplacementData, List customHeaders, boolean bHtml) throws Exception
sFrom
- the SMTP from addresssReply
- the SMTP reply-to addresstoAddrs
- array of recipient addresses and typessSubject
- the email subjectsMsgTemplate
- the email message templatesGateway
- the SMTP serversUserID
- the SMTP user's accountsPassword
- the SMTP user's passwordsEncoding
- encoding to use for message and subject (may be null)hReplacementData
- Map
containing replacement data key/value pairscustomHeaders
- an List of Strings, each string containing a custom SMTP header line (may be null)bHtml
- flag to send message as plain text or HTML
Exception
public static byte[] encodeHTML(String input, String encoding) throws IOException
input
- string to encodeencoding
- encoding to use
IOException
protected static String simpleReplaceData(String value, Map hReplacementData)
value
- input stringhReplacementData
- Map
containing replacement data key/value pairs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |