Class MailServiceHelper
java.lang.Object
net.solarnetwork.central.mail.support.MailServiceHelper
- All Implemented Interfaces:
Serializable
Factory helper class for creating mail objects.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateAddress(String toName, String toAddress) Create a newMailAddressfrom a display name and an email address.createResourceDataSource(String subject, String resourcePath, Locale locale, Object... params) Create a newMessageTemplateDataSourcefrom necessary components.
-
Constructor Details
-
MailServiceHelper
public MailServiceHelper()
-
-
Method Details
-
createAddress
Create a newMailAddressfrom a display name and an email address.- Parameters:
toName- the display nametoAddress- the email address- Returns:
- new MailAddress
-
createResourceDataSource
public MessageTemplateDataSource createResourceDataSource(String subject, String resourcePath, Locale locale, Object... params) Create a newMessageTemplateDataSourcefrom necessary components.- Parameters:
subject- the mail subjectresourcePath- the resource pathlocale- the message localeparams- the message template parameters- Returns:
- new MessageTemplateDataSource
-