Interface TinyMailService
-
- All Implemented Interfaces:
public interface TinyMailServiceSend mail sync or async, save to database first to ensure mail must be sent.
- Since:
2022-12-29
trydofor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceTinyMailService.StatusHookhook the sending result (success/failure), and can stop the next send. should not throw exception in the hook.
-
Method Summary
Modifier and Type Method Description abstract booleansend(@NotNull() TinyMail message, boolean retry)Sync send, return success or not, or throw exception. abstract booleanpost(@NotNull() TinyMail message, boolean retry)Sync send, fire and forget, no exception throw. abstract longemit(@NotNull() TinyMail message, boolean retry)Async, no exception throw. booleansend(@NotNull() TinyMailPlain message)Sync send, return success or not, or throw exception. booleanpost(@NotNull() TinyMailPlain message)Sync send, fire and forget, no exception throw. longemit(@NotNull() TinyMailPlain message)Async, no exception throw. abstract booleansend(long id, boolean retry, boolean check)Sync send, fire and forget, no exception throw. abstract booleanpost(long id, boolean retry, boolean check)Sync send, fire and forget, no exception throw. abstract longemit(long id, boolean retry, boolean check)Async, no exception throw. abstract longsave(@NotNull() TinyMailPlain message)Create(id is empty) or edit a mail, return the id abstract intscan()Sync scan the mail to resend, return the count, and send them async longauto(@NotNull() TinyMail message, boolean retry)Create the mail, and auto send it in sync or async way. longauto(@NotNull() TinyMailPlain message)Create the mail, and auto send it in sync or async way. -
-
Method Detail
-
send
abstract boolean send(@NotNull() TinyMail message, boolean retry)
Sync send, return success or not, or throw exception. If not success, async retry
-
post
abstract boolean post(@NotNull() TinyMail message, boolean retry)
Sync send, fire and forget, no exception throw. If not success, async retry
-
emit
abstract long emit(@NotNull() TinyMail message, boolean retry)
Async, no exception throw. auto batch send. Return the estimated sending time, `-1` for failure If not success, async retry.
-
send
boolean send(@NotNull() TinyMailPlain message)
Sync send, return success or not, or throw exception. If not success, async retry
-
post
boolean post(@NotNull() TinyMailPlain message)
Sync send, fire and forget, no exception throw. If not success, async retry
-
emit
long emit(@NotNull() TinyMailPlain message)
Async, no exception throw. auto batch send. Return the estimated sending time, `-1` for failure If not success, async retry.
-
send
abstract boolean send(long id, boolean retry, boolean check)
Sync send, fire and forget, no exception throw. If not success, async retry, whether to check state before sending
-
post
abstract boolean post(long id, boolean retry, boolean check)
Sync send, fire and forget, no exception throw. If not success, async retry, whether to check state before sending
-
emit
abstract long emit(long id, boolean retry, boolean check)
Async, no exception throw. auto batch send. Return the estimated sending time, `-1` for failure If not success, async retry, whether to check state before sending
-
save
abstract long save(@NotNull() TinyMailPlain message)
Create(id is empty) or edit a mail, return the id
-
scan
abstract int scan()
Sync scan the mail to resend, return the count, and send them async
-
auto
long auto(@NotNull() TinyMail message, boolean retry)
Create the mail, and auto send it in sync or async way. `-1` means failure, `0` means sync send, otherwise means async send at estimated sending time
-
auto
long auto(@NotNull() TinyMailPlain message)
Create the mail, and auto send it in sync or async way. `-1` means failure, `0` means sync send, otherwise means async send at estimated sending time
-
-
-
-