Package org.ctan.site.services.mail
Class MailService
java.lang.Object
org.ctan.site.services.mail.MailService
The class
MailService
contains a service to send mails.
A mail template can be used. This is processed with Apache FreeMarkerâ„¢ to apply substitutions.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionMailService
(@NonNull CtanConfiguration.MailConfig cfg) This is the constructor for the classMailService
. -
Method Summary
Modifier and TypeMethodDescriptionjakarta.mail.internet.MimeMessage
send
(@NonNull MailService.Mail mail) The methodsend
provides means to sent an email.
-
Constructor Details
-
MailService
This is the constructor for the classMailService
.- Parameters:
cfg
- the configuration
-
-
Method Details
-
send
public jakarta.mail.internet.MimeMessage send(@NonNull @NonNull MailService.Mail mail) throws MailException The methodsend
provides means to sent an email.- Parameters:
mail
- the data for the mail to be sent- Returns:
- the message sent
- Throws:
MailException
- in case of an error
-