Class BrandedEmailSender
java.lang.Object
io.meeds.social.core.mail.BrandedEmailSender
Sends branded HTML emails to platform users: a caller provides the resolved
subject, a content fragment (the paragraphs specific to its email) and
optional custom tokens; this sender injects the fragment in the common
branded layout, resolves the ${...} shared bundle keys in the user language,
then substitutes the standard tokens ($EMAIL_TITLE with the subject, $LANG,
$USER_FULL_NAME, $SITE_NAME, $COMPANY_LINK, $PRIMARY_COLOR) before sending
through the mail service.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetUserLang(String username) voidsendEmail(String username, String recipientEmail, String emailSubject, String contentTemplatePath, Map<String, String> customTokens) Sends the email of a user to the given address instead of the address of the user's account, when one is given: the email change sends its code to the new address.voidsendEmail(String username, String emailSubject, String contentTemplatePath, Map<String, String> customTokens)
-
Field Details
-
EMAIL_TITLE_PARAM
- See Also:
-
EMAIL_CONTENT_PARAM
- See Also:
-
-
Constructor Details
-
BrandedEmailSender
public BrandedEmailSender()
-
-
Method Details
-
sendEmail
-
sendEmail
public void sendEmail(String username, String recipientEmail, String emailSubject, String contentTemplatePath, Map<String, String> customTokens) throws ExceptionSends the email of a user to the given address instead of the address of the user's account, when one is given: the email change sends its code to the new address. The wording stays the user's: name and language.- Throws:
Exception
-
getUserLang
-