Class MailSenderMessage

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

public class MailSenderMessage extends Object
Mail Sender Output Message Class
Since:
2024-05-29
Version:
2.0.1
Author:
SKN Shukhan
Use Case:
Spring Boot Reactive
Dedicated To:
Logno, Atoshi and My Parents
  • Constructor Details

    • MailSenderMessage

      private MailSenderMessage()
      Private constructor to make the class non-instantiable
      Since:
      v2.0.0
  • Method Details

    • parameterError

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

      protected static reactor.core.publisher.Mono<String> exceptionErrorMessaging(String error)
      Protected static 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:
      v2.0.0
    • exceptionErrorIO

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

      When any error occurs regarding file attachment then this method returns the proper error message

      The error type is 'IOException'

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

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

      protected static reactor.core.publisher.Mono<String> sendMailWithAttachmentSuccess()
      Protected static 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:
      v2.0.0
    • sendMailWithHtmlTemplateSuccess

      protected static reactor.core.publisher.Mono<String> sendMailWithHtmlTemplateSuccess()
      Protected static 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:
      v2.0.0
    • sendMailWithHtmlTemplateAndAttachmentSuccess

      protected static reactor.core.publisher.Mono<String> sendMailWithHtmlTemplateAndAttachmentSuccess()
      Protected static 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:
      v2.0.0