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 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 mail
      stream - 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 mail
      IOException - 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 mail
      template - 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 mail
      template - MailSenderHtmlTemplate object that contains all the information regarding thymeleaf
      stream - 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 mail
      IOException - an exception is thrown if an error occurs in file attachment
      Since:
      v2.0.0