Class DefaultEmailService
java.lang.Object
it.ozimov.springboot.mail.service.defaultimpl.DefaultEmailService
- All Implemented Interfaces:
EmailService
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultEmailService(@NonNull org.springframework.mail.javamail.JavaMailSender javaMailSender, @NonNull EmailToMimeMessage emailToMimeMessage, @NonNull EmailLogRenderer emailLogRenderer) DefaultEmailService(@NonNull org.springframework.mail.javamail.JavaMailSender javaMailSender, TemplateService templateService, @NonNull EmailToMimeMessage emailToMimeMessage, @NonNull EmailLogRenderer emailLogRenderer) -
Method Summary
-
Constructor Details
-
DefaultEmailService
@Autowired(required=false) public DefaultEmailService(@NonNull @NonNull org.springframework.mail.javamail.JavaMailSender javaMailSender, TemplateService templateService, @NonNull @NonNull EmailToMimeMessage emailToMimeMessage, @NonNull @NonNull EmailLogRenderer emailLogRenderer) -
DefaultEmailService
@Autowired(required=false) public DefaultEmailService(@NonNull @NonNull org.springframework.mail.javamail.JavaMailSender javaMailSender, @NonNull @NonNull EmailToMimeMessage emailToMimeMessage, @NonNull @NonNull EmailLogRenderer emailLogRenderer)
-
-
Method Details
-
send
Description copied from interface:EmailServiceSend an email message.The send date is set or overridden if any is present.
- Specified by:
sendin interfaceEmailService- Parameters:
email- an email to be send
-
send
public jakarta.mail.internet.MimeMessage send(@NonNull @NonNull Email email, @NonNull @NonNull String template, Map<String, Object> modelObject, @NonNull @NonNull InlinePicture... inlinePictures) throws CannotSendEmailExceptionDescription copied from interface:EmailServiceSend an email message.The body is ignored if present. The send date is set or overridden if any is present.
- Specified by:
sendin interfaceEmailService- Parameters:
email- an email to be sendtemplate- the reference to the template filemodelObject- the model object to be used for the template engine, it may be nullinlinePictures- list of pictures to be rendered inline in the template- Throws:
CannotSendEmailException
-