Class MailSenderMessage

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

@Component public class MailSenderMessage extends Object
Mail sender output message class
Since:
07-03-2024
Version:
1.0.0
Author:
SKN
Dedicated To:
Trina, Logno and Atoshi
  • Constructor Details

    • MailSenderMessage

      public MailSenderMessage()
  • Method Details

    • parameterError

      protected static String parameterError()
      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()
      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 String exceptionError(String error)
      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 String sendMailSuccess()
      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 String sendMailWithAttachmentSuccess()
      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 String sendMailWithHtmlTemplateSuccess()
      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 String sendMailWithHtmlTemplateAndAttachmentSuccess()
      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