Package io.quarkus.mailer
Interface MailTemplate.MailTemplateInstance
- All Known Implementing Classes:
MailTemplateInstanceImpl
- Enclosing interface:
- MailTemplate
public static interface MailTemplate.MailTemplateInstance
Represents an instance of
MailTemplate.
This construct is not thread-safe.
-
Method Summary
Modifier and TypeMethodDescriptionaddAttachment(String name, byte[] data, String contentType) addAttachment(String name, File file, String contentType) addInlineAttachment(String name, byte[] data, String contentType, String contentId) addInlineAttachment(String name, File file, String contentType, String contentId) bounceAddress(String bounceAddress) default io.smallrye.mutiny.Uni<Void>send()Sends all e-mail definitions based on available template variants, i.e.default voidSends all e-mail definitions and blocks the current thread while waiting for the result.setAttribute(String key, Object value) default io.quarkus.qute.TemplateInstanceThe returned instance does not represent a specific template but a delegating template.
-
Method Details
-
mail
-
to
-
cc
-
bcc
-
subject
-
from
-
replyTo
-
replyTo
-
bounceAddress
-
addInlineAttachment
default MailTemplate.MailTemplateInstance addInlineAttachment(String name, File file, String contentType, String contentId) -
addInlineAttachment
default MailTemplate.MailTemplateInstance addInlineAttachment(String name, byte[] data, String contentType, String contentId) -
addAttachment
-
addAttachment
default MailTemplate.MailTemplateInstance addAttachment(String name, byte[] data, String contentType) -
data
- Parameters:
key-value-- Returns:
- self
- See Also:
-
TemplateInstance.data(String, Object)
-
setAttribute
- Parameters:
key-value-- Returns:
- self
- See Also:
-
TemplateInstance.setAttribute(String, Object)
-
send
Sends all e-mail definitions based on available template variants, i.e.text/htmlandtext/plaintemplate variants.- Returns:
- a
Uniindicating when the mails have been sent - See Also:
-
sendAndAwait
default void sendAndAwait()Sends all e-mail definitions and blocks the current thread while waiting for the result.- See Also:
-
templateInstance
default io.quarkus.qute.TemplateInstance templateInstance()The returned instance does not represent a specific template but a delegating template.You can select the corresponding variant via
TemplateInstance.setAttribute(String, Object)where the attribute key isTemplateInstance.SELECTED_VARIANT. If no variant is selected, the default instance is used.- Returns:
- the underlying template instance
-