public interface EmailService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Modifier and Type | Method and Description |
---|---|
boolean |
isFileStorageUsed() |
java.lang.String |
loadContentText(SendingMessage sendingMessage)
Load content text for given message.
|
void |
sendEmail(EmailInfo info)
Send email synchronously.
|
void |
sendEmail(java.lang.String address,
java.lang.String caption,
java.lang.String body,
EmailAttachment... attachment)
Deprecated.
|
void |
sendEmail(java.lang.String address,
java.lang.String caption,
java.lang.String body,
java.lang.String bodyContentType,
EmailAttachment... attachment)
Send email synchronously.
|
void |
sendEmailAsync(EmailInfo info)
Send email asynchronously.
|
void |
sendEmailAsync(EmailInfo info,
java.lang.Integer attemptsCount,
java.util.Date deadline)
Send email asynchronously, with limited number of attempts.
|
static final java.lang.String NAME
@Deprecated void sendEmail(java.lang.String address, java.lang.String caption, java.lang.String body, EmailAttachment... attachment) throws EmailException
sendEmail(String, String, String, String, EmailAttachment...)
instead.
Send email synchronously.
address
- comma or semicolon separated list of addressescaption
- email subjectbody
- email bodyattachment
- email attachmentsEmailException
- in case of any errorsvoid sendEmail(java.lang.String address, java.lang.String caption, java.lang.String body, java.lang.String bodyContentType, EmailAttachment... attachment) throws EmailException
address
- comma or semicolon separated list of addressescaption
- email subjectbody
- email bodybodyContentType
- email body like "text/plain; charset=UTF-8" or "text/html; charset=UTF-8", etcattachment
- email attachmentsEmailException
- in case of any errorsvoid sendEmail(EmailInfo info) throws EmailException
info
- email detailsEmailException
- in case of any errorsvoid sendEmailAsync(EmailInfo info, @Nullable java.lang.Integer attemptsCount, @Nullable java.util.Date deadline)
The actual sending is performed by invoking the EmailerAPI.processQueuedEmails()
(e.g. from a scheduled task).
info
- email detailsattemptsCount
- count of attempts to send (1 attempt = 1 emailer cron tick)deadline
- Emailer tries to send message till deadline.
If deadline has come and message has not been sent, status of this message is changed to
SendingStatus.NOTSENT
void sendEmailAsync(EmailInfo info)
The actual sending is performed by invoking the EmailerAPI.processQueuedEmails()
(e.g. from a scheduled task).
info
- email detailsjava.lang.String loadContentText(SendingMessage sendingMessage)
boolean isFileStorageUsed()