| Constructor and Description |
|---|
MessageBuilder() |
| Modifier and Type | Method and Description |
|---|---|
Message.MessageBuilder |
attachment(File attachment)
File attachment.
|
Message.MessageBuilder |
attachment(List<File> attachments)
File attachment.
|
Message.MessageBuilder |
bcc(List<String> bcc)
Same as
to(java.lang.String) but for Bcc. |
Message.MessageBuilder |
bcc(String bcc)
Same as
to(java.lang.String) but for Bcc. |
Message.MessageBuilder |
cc(List<String> cc)
Same as
to(java.lang.String) but for Cc. |
Message.MessageBuilder |
cc(String cc)
Same as
to(java.lang.String) but for Cc. |
Message.MessageBuilder |
deliveryTime(java.time.ZonedDateTime deliveryTime)
Desired time of delivery.
|
Message.MessageBuilder |
dkim(boolean enableDKIM)
Enables/disables DKIM signatures on per-message basis.
|
Message.MessageBuilder |
formData(feign.form.FormData attachment)
File attachment in form of
FormData. |
Message.MessageBuilder |
formData(List<feign.form.FormData> attachments)
File attachment in form of
FormData. |
Message.MessageBuilder |
inline(File attachment)
Attachment with inline disposition.
|
Message.MessageBuilder |
inline(List<File> attachments)
Attachments with inline disposition.
|
Message.MessageBuilder |
mailgunVariables(Map<String,Object> mailgunVariables)
Mailgun’s templates use a fork of the very popular template engine handlebars.
|
Message.MessageBuilder |
myVar(Map<String,Object> myVar)
Allows to attach a custom data to the message
|
Message.MessageBuilder |
recipientVariables(Map<String,Object> recipientVariables)
A dictionary, where the key is a plain recipient address
and the value is a dictionary with variables that can be referenced in the message body.
|
Message.MessageBuilder |
renderTemplate(boolean renderTemplate)
Rendered template in the text part of the message in case of template sending.
|
Message.MessageBuilder |
replyTo(String replyTo)
Specify Reply-To address
|
Message.MessageBuilder |
requireTls(boolean requireTLS)
If set to
true this requires the message only be sent over a TLS connection. |
Message.MessageBuilder |
skipVerification(boolean skipVerification)
If set to
true, the certificate and hostname will not be verified when trying to establish a TLS connection
and Mailgun will accept any certificate during delivery. |
Message.MessageBuilder |
tag(List<String> tags)
Tag string.
|
Message.MessageBuilder |
tag(String tag)
Tag string.
|
Message.MessageBuilder |
testMode(boolean enableSendingInTestMode)
Enables sending in test mode.
|
Message.MessageBuilder |
to(List<String> to)
Email addresses of the recipient
|
Message.MessageBuilder |
to(String to)
Email address of the recipient
|
Message.MessageBuilder |
tracking(boolean toggleTracking)
Toggles tracking on a per-message basis.
|
Message.MessageBuilder |
trackingClicks(YesNoHtml yesNoHtml)
Toggles clicks tracking on a per-message basis.
|
Message.MessageBuilder |
trackingOpens(boolean toggleOpensTracking)
Toggles opens tracking on a per-message basis.
|
public Message.MessageBuilder to(String to)
Email address of the recipient
to - Email address of the recipientpublic Message.MessageBuilder to(List<String> to)
Email addresses of the recipient
to - Email addresses of the recipientpublic Message.MessageBuilder cc(String cc)
Same as to(java.lang.String) but for Cc.
cc - Same as to(java.lang.String) but for Cc.public Message.MessageBuilder cc(List<String> cc)
Same as to(java.lang.String) but for Cc.
cc - Same as to(java.lang.String) but for Cc.public Message.MessageBuilder bcc(String bcc)
Same as to(java.lang.String) but for Bcc.
bcc - Same as to(java.lang.String) but for Bcc.public Message.MessageBuilder bcc(List<String> bcc)
Same as to(java.lang.String) but for Bcc.
bcc - Same as to(java.lang.String) but for Bcc.public Message.MessageBuilder attachment(File attachment)
File attachment. You can post multiple attachment values.
attachment - File attachmentpublic Message.MessageBuilder attachment(List<File> attachments)
File attachment. You can post multiple attachment values.
attachments - File attachmentspublic Message.MessageBuilder formData(feign.form.FormData attachment)
File attachment in form of FormData.
This object encapsulates a byte array and its associated content type.
attachment - attachment in form of FormData.public Message.MessageBuilder formData(List<feign.form.FormData> attachments)
File attachment in form of FormData.
This object encapsulates a byte array and its associated content type.
attachments - attachments in form of FormData.public Message.MessageBuilder inline(File attachment)
Attachment with inline disposition. You can post multiple inline values.
attachment - Attachment with inline disposition.public Message.MessageBuilder inline(List<File> attachments)
Attachments with inline disposition. You can post multiple inline values.
attachments - Attachments with inline disposition.public Message.MessageBuilder renderTemplate(boolean renderTemplate)
Rendered template in the text part of the message in case of template sending.
renderTemplate - Pass true if you want to have rendered template in the text part of the message in case of template sending.public Message.MessageBuilder tag(String tag)
Tag string.
tag - Tag string.public Message.MessageBuilder tag(List<String> tags)
Tag string.
tags - Tag strings.public Message.MessageBuilder dkim(boolean enableDKIM)
Enables/disables DKIM signatures on per-message basis.
enableDKIM - Enables/disables DKIM signatures on per-message basis.public Message.MessageBuilder deliveryTime(java.time.ZonedDateTime deliveryTime)
Desired time of delivery.
Note: Messages can be scheduled for a maximum of 3 days in the future.
deliveryTime - Desired time of delivery.public Message.MessageBuilder testMode(boolean enableSendingInTestMode)
Enables sending in test mode.
enableSendingInTestMode - Enables sending in test mode.public Message.MessageBuilder tracking(boolean toggleTracking)
Toggles tracking on a per-message basis.
toggleTracking - Toggles tracking on a per-message basis.public Message.MessageBuilder trackingClicks(YesNoHtml yesNoHtml)
Toggles clicks tracking on a per-message basis. Has higher priority than domain-level setting.
Pass TRUE, FALSE or HTML_ONLY
yesNoHtml - YesNoHtmlpublic Message.MessageBuilder trackingOpens(boolean toggleOpensTracking)
Toggles opens tracking on a per-message basis. Has higher priority than domain-level setting.
toggleOpensTracking - Toggles opens tracking on a per-message basis.public Message.MessageBuilder requireTls(boolean requireTLS)
If set to true this requires the message only be sent over a TLS connection.
If a TLS connection can not be established, Mailgun will not deliver the message.
If set to false Mailgun will still try and upgrade the connection,
but if Mailgun can not, the message will be delivered over a plaintext SMTP connection.
The default is false.
requireTLS - requires TLSpublic Message.MessageBuilder skipVerification(boolean skipVerification)
If set to true, the certificate and hostname will not be verified when trying to establish a TLS connection
and Mailgun will accept any certificate during delivery.
If set to false, Mailgun will verify the certificate and hostname.
If either one can not be verified, a TLS connection will not be established.
The default is false.
skipVerification - skip verification certificate and hostnamepublic Message.MessageBuilder replyTo(String replyTo)
Specify Reply-To address
replyTo - Reply-To addresspublic Message.MessageBuilder recipientVariables(Map<String,Object> recipientVariables)
A dictionary, where the key is a plain recipient address and the value is a dictionary with variables that can be referenced in the message body.
recipientVariables - A dictionary, where the key is a plain recipient address
and the value is a dictionary with variables that can be referenced in the message body.public Message.MessageBuilder myVar(Map<String,Object> myVar)
Allows to attach a custom data to the message
myVar - dictionarypublic Message.MessageBuilder mailgunVariables(Map<String,Object> mailgunVariables)
Mailgun’s templates use a fork of the very popular template engine handlebars.
Use this field to provide values for a substitution to render them in the template.
mailgunVariables - A dictionary where the key is a placeholder and the value is a value for a substitution.Copyright © 2022. All rights reserved.