Represents the merge_vars
array in the API definition.
Represents the merge_vars
array in the API definition.
per-recipient merge variables, which override global merge variables with the same name.
The recipient associated with the given merge_vars
. See Recipient
The specific merge_vars for the given recipient
. See MergeVar
Modelling the responses/requests for the /messages/send-template.json
method
Modelling the responses/requests for the /messages/send-template.json
method
Every template defined in mandrill is represented by its own type.
A template has a name
and a message
object, which is represented by
net.gutefrage.mandrill.messages.SendTemplate.Message.
The message object defines:
- the recipients - the recipients individual merge_vars (placeholders) - the global_merge_vars that are inserted in each template
This is the minimal format that gets generated by our API
{ "key": "the-api-key", "subject": "optional subject to override defaults in mandrill template", "template_name": "template-name", "template_content": [], "send_at": "YYYY-MM-DD HH:MM:SS", "message": { "to": [{ "email": "test@example.com" }], "merge_vars": [ { "rcpt": "test@example.com", "vars": [ { "name": "SOME_LINK", "content": "https://www.example.com" } ] } ] } }
A valid API key
The immutable name or slug of a template that exists in the user's account. For backwards-compatibility, the template name may also be used but the immutable slug is preferred.
Additional template content
An array of template content to send. Each item in the array should be a struct with two keys - name: the name of the content block to set the content for, and content: the actual content to put into the block
When this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately. An additional fee applies for scheduled email, and this feature is only available to accounts with a positive balance.
Response from the /messages/send-template.json
endpoint.
Response from the /messages/send-template.json
endpoint.
Mandrill id for the performed action
Receiver email
Status of the sent email
Optional reject reason if the email could not be sent
The email address of the recipient
The optional display name to use for the recipient