Package best.skn.mail.services.impls
Class MailSenderMessage
java.lang.Object
best.skn.mail.services.impls.MailSenderMessage
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 Summary
ConstructorsModifierConstructorDescriptionprivatePrivate constructor to make the class non-instantiable -
Method Summary
Modifier and TypeMethodDescriptionprotected static reactor.core.publisher.Mono<String> exceptionErrorIO(String error) Protected static method to return an error message for io exceptionprotected static reactor.core.publisher.Mono<String> exceptionErrorMessaging(String error) Protected static method to return an error message for messaging exceptionprotected static StringProtected static method to return an error message for null parameterprotected static reactor.core.publisher.Mono<String> Protected static method to return a success message for sending basic mailprotected static reactor.core.publisher.Mono<String> Protected static method to return a success message for sending basic mail with attachmentprotected static reactor.core.publisher.Mono<String> Protected static method to return a success message for sending mail with HTML template and attachmentprotected static reactor.core.publisher.Mono<String> Protected static method to return a success message for sending mail with HTML template
-
Constructor Details
-
MailSenderMessage
private MailSenderMessage()Private constructor to make the class non-instantiable- Since:
- v2.0.0
-
-
Method Details
-
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 method to return an error message for messaging exceptionWhen 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 method to return an error message for io exceptionWhen 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 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 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 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 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
-