public class ERMailUtils extends Object
ERMailUtils
contains various utility method related to mail sending.
ERMailUtils
はメール送信の為のユーティリティー・メソッド集
Constructor and Description |
---|
ERMailUtils() |
Modifier and Type | Method and Description |
---|---|
static NSArray<String> |
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<String> addrs)
Method that converts NSArray of String emails to InternetAddress [].
|
static javax.mail.internet.InternetAddress[] |
convertNSDictionaryToInternetAddresses(NSDictionary<String,String> addrs,
String charset)
Method that converts NSDictionary consisting of String emails as keys and String personal names
to InternetAddress [].
|
static NSArray<String> |
emailsFromBulkList(String str)
This method will parse a large string of email address that could be separated by commas,
semicolon, tabs, spaces, carriage returns, (even mixed) and will return an NSArray of addresses(strings)
|
static String |
encodeString(String string,
String charset)
エンコーディング処理
|
static WOComponent |
instantiatePage(String pageName,
NSDictionary<String,Object> 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<String,Object> 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.
|
public static ERMailDeliveryHTML sharedDeliverer()
ERMailDeliveryHTML
singletonERMailDeliveryHTML
シングルトンpublic static WOComponent instantiatePage(String pageName, NSDictionary<String,Object> sessionDict)
ERXApplication
. Used to instantiate a WOComponent, typically
outside of a session.
ERXApplication
内にある同名メソッドの拡張版。
セッションの外側のインスタンス化に使用します。
pageName
- sessionDict
- WOComponent
.WOComponent
public static void sendHTMLMail(ERMailDeliveryHTML delivery, String pageName, String alternatePageName, String emailFrom, String emailTo, String emailReplyTo, String subject)
delivery
- ERMailDeliveryHTML
used to send the mail.ERMailDeliveryHTML
pageName
- alternatePageName
- emailFrom
- emailTo
- emailReplyTo
- subject
- public static void sendHTMLMail(String pageName, String alternatePageName, String emailFrom, String emailTo, String emailReplyTo, String subject)
pageName
- alternatePageName
- emailFrom
- emailTo
- emailReplyTo
- subject
- public static void setDictionaryValuesInSession(NSDictionary<String,Object> dict, WOSession session)
instantiatePage(String, NSDictionary)
or
ERXApplication.instantiatePage(String)
.)
instantiatePage(String, NSDictionary)
や ERXApplication.instantiatePage(String)
でインスタンス化されているページを送信する場合に有効です。)
dict
- NSDictionary
value containing the values we want to set in the session parameter.NSDictionary
session
- WOSession
value that will receive the values contained in the dict parameter.WOSession
public static javax.mail.internet.InternetAddress[] convertNSArrayToInternetAddresses(NSArray<String> addrs) throws javax.mail.internet.AddressException
addrs
- NSArray
valueNSArray
InternetAddress[]
valueInternetAddress[]
javax.mail.internet.AddressException
- public static NSArray<String> convertInternetAddressesToNSArray(javax.mail.Address[] addressesArray)
Note that this method will not only accept Address [] but also InternetAddress [].
注意: Address [] 又は InternetAddress [] が有効です
addressesArray
- Address[]
valueAddress[]
NSArray
valueNSArray
public static javax.mail.internet.InternetAddress[] convertNSDictionaryToInternetAddresses(NSDictionary<String,String> addrs, String charset) throws javax.mail.internet.AddressException
addrs
- NSDictionary
with email, personal name as key value pairNSDictionary
メール 個人名の KVcharset
- String
of the charset to use for personal stringInternetAddress[]
valueInternetAddress[]
javax.mail.internet.AddressException
- public static NSArray<String> emailsFromBulkList(String str)
str
- Copyright © 2002 – 2024 Project Wonder.