Class SmtpMailNotificationHandler
java.lang.Object
es.kukenan.smartfi.microservice.backoffice.service.communication.SmtpMailNotificationHandler
Service class that holds all the mail notification sending bussiness logic.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringSMTP mail sender.private org.springframework.mail.javamail.JavaMailSenderSmtp Rest client. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
mailFrom
SMTP mail sender. -
mailSender
@Autowired private org.springframework.mail.javamail.JavaMailSender mailSenderSmtp Rest client.
-
-
Constructor Details
-
SmtpMailNotificationHandler
public SmtpMailNotificationHandler()
-
-
Method Details
-
send
Send a notification.- Parameters:
destination- user email destination.name- user name.subject- email subject.title- email title.msg- email content.
-
loadhtmlFile
Load HTML template from file.- Returns:
- HTML string template.
- Throws:
IOException- if getResource from ResourceLoader fails.
-