|
Project Wonder 2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object er.javamail.ERMailUtils
ERMailUtils
contains various utility method related
to mail sending.
Constructor Summary | |
ERMailUtils()
|
Method Summary | |
static NSArray |
convertInternetAddressesToNSArray(javax.mail.Address[] addressesArray)
Method that converts Address [] loaded with either Address or InternetAddress objects to NSArray of String emails. |
static javax.mail.internet.InternetAddress[] |
convertNSArrayToInternetAddresses(NSArray addrs)
Method that converts NSArray of String emails to InternetAddress []. |
static String |
encodeString(String string,
String charset)
|
static WOComponent |
instantiatePage(String pageName,
NSDictionary sessionDict)
Augmented version of the method found in ERXApplication .
|
static void |
sendHTMLMail(ERMailDeliveryHTML delivery,
String pageName,
String alternatePageName,
String emailFrom,
String emailTo,
String emailReplyTo,
String subject)
Use this method to send an HTML mail. |
static void |
sendHTMLMail(String pageName,
String alternatePageName,
String emailFrom,
String emailTo,
String emailReplyTo,
String subject)
Use this method to send an HTML mail, but default mail delivery. |
static void |
setDictionaryValuesInSession(NSDictionary dict,
WOSession session)
This method sets the values found in a dictionary into the session's state dictionary. |
static ERMailDeliveryHTML |
sharedDeliverer()
Accessor to the shared instance of a ERMailDeliveryHTML. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ERMailUtils()
Method Detail |
public static ERMailDeliveryHTML sharedDeliverer()
ERMailDeliveryHTML
singletonpublic static WOComponent instantiatePage(String pageName, NSDictionary sessionDict)
ERXApplication
.
Used to instantiate a WOComponent, typically outside of a session.
pageName
- The name of the WOComponent that must be
instantiated.sessionDict
- can be provided in order to set objects/keys
in the newly created session of the component. This is useful
when one want to preserve state when sending a mail.
WOComponent
.public static void sendHTMLMail(ERMailDeliveryHTML delivery, String pageName, String alternatePageName, String emailFrom, String emailTo, String emailReplyTo, String subject)
delivery
- the ERMailDeliveryHTML
used to
send the mail.pageName
- The name of the WOComponent that must be
instantiated.alternatePageName
- The name of the WOComponent that
represents for the text that must be displayed when an
alternate plain text version of the mail needs to be provided.emailFrom
- the email address the mail is sent fromemailTo
- the email address the mail is sent toemailReplyTo
- the email address where the mail must be
replied-to.subject
- the subject of the mailpublic static void sendHTMLMail(String pageName, String alternatePageName, String emailFrom, String emailTo, String emailReplyTo, String subject)
pageName
- The name of the WOComponent that must be
instantiated.alternatePageName
- The name of the WOComponent that
represents for the text that must be displayed when an
alternate plain text version of the mail needs to be provided.emailFrom
- the email address the mail is sent fromemailTo
- the email address the mail is sent toemailReplyTo
- the email address where the mail must be
replied-to.subject
- the subject of the mailpublic static void setDictionaryValuesInSession(NSDictionary dict, WOSession session)
ERMailUtils.instantiatePage
or
ERXApplication.instantiatePage
.)
dict
- a NSDictionary
value containing the
values we want to set in the session parameter.session
- a WOSession
value that will
receive the values contained in the dict parameter.public static String encodeString(String string, String charset)
public static javax.mail.internet.InternetAddress[] convertNSArrayToInternetAddresses(NSArray addrs) throws javax.mail.internet.AddressException
addrs
- a NSArray
value
InternetAddress[]
value
javax.mail.internet.AddressException
- if an error occurspublic static NSArray convertInternetAddressesToNSArray(javax.mail.Address[] addressesArray) throws javax.mail.internet.AddressException
Note that this method will not only accept Address [] but also InternetAddress [].
addressesArray
- an Address[]
value
NSArray
value
javax.mail.internet.AddressException
- if an error occurs
|
Last updated: Do, Dez 9, 2004 12:46 PM CET | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |