Package com.earth2me.essentials
Class MailServiceImpl
java.lang.Object
com.earth2me.essentials.MailServiceImpl
- All Implemented Interfaces:
MailService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetMailLine
(MailMessage mail) Generates the message sent to the recipient of the givenMailMessage
.Object[]
getMailTlArgs
(MailMessage message) Helper method to get the translation arguments for a givenMailMessage
.getMailTlKey
(MailMessage message) Helper method to get the translation key for a givenMailMessage
.void
sendLegacyMail
(IUser recipient, String message) Sends a legacy message to the user without any advanced features.void
sendMail
(IUser recipient, MailSender sender, String message) void
sendMail
(IUser recipient, MailSender sender, String message, long expireAt)
-
Constructor Details
-
MailServiceImpl
-
-
Method Details
-
sendMail
Description copied from interface:MailService
- Specified by:
sendMail
in interfaceMailService
- Parameters:
recipient
- TheIUser
which to send the message to.sender
- TheMailSender
which sent the message.message
- The message content.
-
sendMail
Description copied from interface:MailService
- Specified by:
sendMail
in interfaceMailService
- Parameters:
recipient
- TheIUser
which to send the message to.sender
- TheMailSender
which sent the message.message
- The message content.expireAt
- The millisecond epoch at which this message expires, or 0 if the message doesn't expire.
-
sendLegacyMail
Description copied from interface:MailService
Sends a legacy message to the user without any advanced features.- Specified by:
sendLegacyMail
in interfaceMailService
- Parameters:
recipient
- TheIUser
which to send the message to.message
- The message content.- See Also:
-
getMailLine
Description copied from interface:MailService
Generates the message sent to the recipient of the givenMailMessage
.- Specified by:
getMailLine
in interfaceMailService
- Parameters:
mail
- TheMailMessage
to generate the message for.- Returns:
- The formatted message to be sent to the recipient.
-
getMailTlKey
Description copied from interface:MailService
Helper method to get the translation key for a givenMailMessage
.- Specified by:
getMailTlKey
in interfaceMailService
- Returns:
- the translation key.
-
getMailTlArgs
Description copied from interface:MailService
Helper method to get the translation arguments for a givenMailMessage
.- Specified by:
getMailTlArgs
in interfaceMailService
- Returns:
- the translation arguments.
-