Class MailSenderMessage

java.lang.Object
best.skn.mail.services.MailSenderMessage

@Component public class MailSenderMessage extends Object
Mail Sender Output Message Class
Since:
2024-03-07
Version:
1.2.2
Author:
SKN
Use Case:
Spring Boot Reactive
Dedicated To:
Trina, Logno and Atoshi
  • Constructor Details

    • MailSenderMessage

      public MailSenderMessage()
  • Method Details

    • parameterError

      protected static String parameterError()
      Protected method to return an error message for null parameter
      Returns:
      a String containing the error message for null parameter
      Since:
      v1.0.0
    • htmlContentError

      protected static String htmlContentError()
      Protected method to return an error message for null HTML content
      Returns:
      a String containing the error message for null HTML content
      Since:
      v1.0.0
    • exceptionError

      protected static reactor.core.publisher.Mono<String> exceptionError(String error)
      Protected method to return an error message for messaging exception

      When mail is not sent successfully then this method returns the proper error message

      The error type is 'MessagingException'

      Parameters:
      error - a String to hold the messaging exception error message
      Returns:
      a String containing the new and formatted messaging exception error message
      Since:
      v1.0.0
    • sendMailSuccess

      protected static reactor.core.publisher.Mono<String> sendMailSuccess()
      Protected method to return a success message for sending basic mail
      Returns:
      a String containing success message for sending basic mail
      Since:
      v1.0.0
    • sendMailWithAttachmentSuccess

      protected static reactor.core.publisher.Mono<String> sendMailWithAttachmentSuccess()
      Protected method to return a success message for sending basic mail with attachment
      Returns:
      a String containing success message for sending basic mail with attachment
      Since:
      v1.0.0
    • sendMailWithHtmlTemplateSuccess

      protected static reactor.core.publisher.Mono<String> sendMailWithHtmlTemplateSuccess()
      Protected method to return a success message for sending mail with HTML template
      Returns:
      a String containing success message for sending mail with HTML template
      Since:
      v1.0.0
    • sendMailWithHtmlTemplateAndAttachmentSuccess

      protected static reactor.core.publisher.Mono<String> sendMailWithHtmlTemplateAndAttachmentSuccess()
      Protected method to return a success message for sending mail with HTML template and attachment
      Returns:
      a String containing success message for sending mail with HTML template and attachment
      Since:
      v1.0.0