ERMailUtils Class Reference
List of all members.
|
Static Public Member Functions |
| static NSArray< String > | convertInternetAddressesToNSArray (Address[] addressesArray) |
| static InternetAddress[] | convertNSArrayToInternetAddresses (NSArray addrs) throws AddressException |
| static InternetAddress[] | convertNSDictionaryToInternetAddresses (NSDictionary< String, String > addrs, String charset) throws AddressException |
| static String | encodeString (String string, String charset) |
| static WOComponent | instantiatePage (String pageName, NSDictionary sessionDict) |
| static void | sendHTMLMail (String pageName, String alternatePageName, String emailFrom, String emailTo, String emailReplyTo, String subject) |
| static void | sendHTMLMail (ERMailDeliveryHTML delivery, String pageName, String alternatePageName, String emailFrom, String emailTo, String emailReplyTo, String subject) |
| static void | setDictionaryValuesInSession (NSDictionary dict, WOSession session) |
| static ERMailDeliveryHTML | sharedDeliverer () |
Static Private Attributes |
| static Logger | log = Logger.getLogger(ERMailUtils.class) |
| static ERMailDeliveryHTML | sharedDeliverer |
Detailed Description
ERMailUtils contains various utility method related to mail sending.
- Author:
- Camille Troillard
- Version:
- Id
- ERMailUtils.java 8871 2009-01-30 09:59:31Z thoepfner
Member Function Documentation
| static NSArray<String> convertInternetAddressesToNSArray |
( |
Address[] |
addressesArray |
) |
[static] |
Method that converts Address [] loaded with either Address or InternetAddress objects to NSArray of String emails.
Note that this method will not only accept Address [] but also InternetAddress [].
- Parameters:
-
| addressesArray | an Address[] value |
- Returns:
- a
NSArray value
- Exceptions:
-
| AddressException | if an error occurs |
| static InternetAddress [] convertNSArrayToInternetAddresses |
( |
NSArray |
addrs |
) |
throws AddressException [static] |
Method that converts NSArray of String emails to InternetAddress [].
- Parameters:
-
- Returns:
- an
InternetAddress[] value
- Exceptions:
-
| AddressException | if an error occurs |
| static InternetAddress [] convertNSDictionaryToInternetAddresses |
( |
NSDictionary< String, String > |
addrs, |
|
|
String |
charset | |
|
) |
| | throws AddressException [static] |
Method that converts NSDictionary consisting of String emails as keys and String personal names to InternetAddress [].
- Parameters:
-
| addrs | a NSDictionary with email, personal name as key value pair |
| charset | a String of the charset to use for personal string |
- Returns:
- an
InternetAddress[] value
- Exceptions:
-
| AddressException | if an error occurs |
| static WOComponent instantiatePage |
( |
String |
pageName, |
|
|
NSDictionary |
sessionDict | |
|
) |
| | [static] |
Augmented version of the method found in ERXApplication. Used to instantiate a WOComponent, typically outside of a session.
- Parameters:
-
| 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. |
- Returns:
- a newly instantiated
WOComponent.
Use this method to send an HTML mail, but default mail delivery.
- Parameters:
-
| 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 from |
| emailTo | the email address the mail is sent to |
| emailReplyTo | the email address where the mail must be replied-to. |
| subject | the subject of the mail |
Use this method to send an HTML mail.
- Parameters:
-
| 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 from |
| emailTo | the email address the mail is sent to |
| emailReplyTo | the email address where the mail must be replied-to. |
| subject | the subject of the mail |
| static void setDictionaryValuesInSession |
( |
NSDictionary |
dict, |
|
|
WOSession |
session | |
|
) |
| | [static] |
This method sets the values found in a dictionary into the session's state dictionary. This method is useful when one want to transfer current session's state into a newly created session (for example when sending a mail whose page has been instantiated with ERMailUtils.instantiatePage or ERXApplication.instantiatePage.)
- Parameters:
-
| 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. |
Member Data Documentation
Logger log = Logger.getLogger(ERMailUtils.class) [static, private] |
The shared mail deliverer
The documentation for this class was generated from the following file:
- /opt/source/Wonder/Frameworks/Core/ERJavaMail/Sources/er/javamail/ERMailUtils.java