Package best.skn.mail.services
Interface MailSenderService
- All Known Implementing Classes:
MailSenderServiceImpl
public interface MailSenderService
Mail Sender Service Interface
- Since:
- 2024-05-29
- Version:
- 2.0.1
- Author:
- SKN Shukhan
- Use Case:
- Spring Boot Reactive
- Dedicated To:
- Logno, Atoshi and My Parents
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<String> Method to send basic mailreactor.core.publisher.Mono<String> sendMailWithAttachment(MailSenderRequestInfo info, MailSenderInputStream stream) Method to send basic mail with attachmentreactor.core.publisher.Mono<String> sendMailWithHtmlTemplate(MailSenderRequestInfo info, MailSenderHtmlTemplate template) Method to send mail with HTML templatereactor.core.publisher.Mono<String> sendMailWithHtmlTemplateAndAttachment(MailSenderRequestInfo info, MailSenderHtmlTemplate template, MailSenderInputStream stream) Method to send mail with HTML template and attachment
-
Method Details
-
sendMail
reactor.core.publisher.Mono<String> sendMail(MailSenderRequestInfo info) throws jakarta.mail.MessagingException Method to send basic mail- Parameters:
info- MailSenderRequestInfo object that contains all the information regarding sending mail- Returns:
- a Mono of String as a response
- Throws:
jakarta.mail.MessagingException- an exception is thrown if an error occurs while sending mail- Since:
- v2.0.0
-
sendMailWithAttachment
reactor.core.publisher.Mono<String> sendMailWithAttachment(MailSenderRequestInfo info, MailSenderInputStream stream) throws jakarta.mail.MessagingException, IOException Method to send basic mail with attachment- Parameters:
info- MailSenderRequestInfo object that contains all the information regarding sending mailstream- MailSenderInputStream object that contains all the information regarding input stream- Returns:
- a Mono of String as a response
- Throws:
jakarta.mail.MessagingException- an exception is thrown if an error occurs while sending mailIOException- an exception is thrown if an error occurs in file attachment- Since:
- v2.0.0
-
sendMailWithHtmlTemplate
reactor.core.publisher.Mono<String> sendMailWithHtmlTemplate(MailSenderRequestInfo info, MailSenderHtmlTemplate template) throws jakarta.mail.MessagingException Method to send mail with HTML template- Parameters:
info- MailSenderRequestInfo object that contains all the information regarding sending mailtemplate- MailSenderHtmlTemplate object that contains all the information regarding thymeleaf- Returns:
- a Mono of String as a response
- Throws:
jakarta.mail.MessagingException- an exception is thrown if an error occurs while sending mail- Since:
- v2.0.0
-
sendMailWithHtmlTemplateAndAttachment
reactor.core.publisher.Mono<String> sendMailWithHtmlTemplateAndAttachment(MailSenderRequestInfo info, MailSenderHtmlTemplate template, MailSenderInputStream stream) throws jakarta.mail.MessagingException, IOException Method to send mail with HTML template and attachment- Parameters:
info- MailSenderRequestInfo object that contains all the information regarding sending mailtemplate- MailSenderHtmlTemplate object that contains all the information regarding thymeleafstream- MailSenderInputStream object that contains all the information regarding input stream- Returns:
- a Mono of String as a response
- Throws:
jakarta.mail.MessagingException- an exception is thrown if an error occurs while sending mailIOException- an exception is thrown if an error occurs in file attachment- Since:
- v2.0.0
-