TransactionalSendTemplate
Send a new transactional message through the Transactional API using a template.
Stored Procedure Specific Information
The TemplateName, TemplateContent, and To inputs are required. For example:
exec TransactionalSendTemplate TemplateContent = '[{\"name\" : \"aaaa\" , \"content\" : \"nakdkasdmk\"}]', TemplateName = 'abcd', To = '[{ \"email\" : \"[email protected]\" , \"name\" : \"XYZ\", \"type\" : \"to\"}]';
Alternatively, you can provide ToEmails, CcEmails, or BccEmails along with TemplateName and TemplateContent to create a template:
exec TransactionalSendTemplate TemplateContent = '[{\"name\" : \"aaaa\" , \"content\" : \"nakdkasdmk\"}]', TemplateName = 'abcd', ToEmails='[email protected],[email protected],[email protected]', ToNames='XYZ,,ABC', CcEmails='[email protected],[email protected]'
Input
| Name | Type | Required | Description |
| TemplateName | String | True | The immutable slug of a template that exists in the user's account. |
| TemplateContent | String | True | An array of template content to send. |
| Html | String | False | The full HTML content to be sent. |
| Text | String | False | Optional full text content to be sent. |
| Subject | String | False | The message subject. |
| FromEmail | String | False | The sender email address. |
| FromName | String | False | Optional from name to be used. |
| To | String | False | An array of recipient information. |
| ToEmails | String | False | Comma separated list of emails for type 'to'. |
| ToNames | String | False | Comma separated list of names for type 'to'. |
| CcEmails | String | False | Comma separated list of emails for type 'cc'. |
| CcNames | String | False | Comma separated list of names for type 'cc'. |
| BccEmails | String | False | Comma separated list of emails for type 'bcc'. |
| BccNames | String | False | Comma separated list of names for type 'bcc'. |
| Headers | String | False | Optional extra headers to add to the message. |
| Important | Boolean | False | Whether or not this message is important, and should be delivered ahead of non-important messages. |
| TrackOpens | Boolean | False | Whether or not to turn on open tracking for the message. |
| TrackClicks | Boolean | False | Whether or not to turn on click tracking for the message. |
| AutoText | Boolean | False | Whether or not to automatically generate a text part for messages that are not given text. |
| AutoHtml | Boolean | False | Whether or not to automatically generate an HTML part for messages that are not given HTML. |
| InlineCss | Boolean | False | Whether or not to automatically inline all CSS styles provided in the message HTML - only for HTML documents less than 256KB in size. |
| UrlStripQs | Boolean | False | Whether or not to strip the query string from URLs when aggregating tracked URL data. |
| PreserveRecipients | Boolean | False | Whether or not to expose all recipients in to 'To' header for each email. |
| ViewContentLink | Boolean | False | Set to false to remove content logging for sensitive emails. |
| BccAddress | String | False | An optional address to receive an exact copy of each recipient's email. |
| TrackingDomain | String | False | A custom domain to use for tracking opens and clicks instead of mandrillapp.com. |
| SigningDomain | String | False | A custom domain to use for SPF/DKIM signing instead of mandrill. |
| ReturnPathDomain | String | False | A custom domain to use for the messages's return-path. |
| Merge | Boolean | False | Whether to evaluate merge tags in the message. |
| MergeLanguage | String | False | The merge tag language to use when evaluating merge tags, either mailchimp or handlebars.
The allowed values are mailchimp, handlebars. |
| GlobalMergeVars | String | False | Global merge variables to use for all recipients. |
| MergeVars | String | False | Per-recipient merge variables, which override global merge variables with the same name. |
| Tags | String | False | An array of string to tag the message with. |
| Subaccount | String | False | The unique id of a subaccount for this message - must already exist or will fail with an error. |
| GoogleAnalyticsDomains | String | False | An array of strings indicating for which any matching URLs will automatically have Google Analytics parameters appended to their query string automatically. |
| GoogleAnalyticsCampaign | String | False | Optional string indicating the value to set for the utm_campaign tracking parameter. |
| Metadata | String | False | Metadata an associative array of user metadata. |
| RecipientMetadata | String | False | Per-recipient metadata that will override the global values specified in the metadata parameter. |
| Attachments | String | False | An array of supported attachments to add to the message. |
| AttachmentLocations | String | False | Comma separated values of file location of attachments. |
| AttachmentName | String | False | Name of the attachment for which the content is sent in AttachmentContent. |
| Images | String | False | An array of embedded images to add to the message. |
| ImageLocations | String | False | Comma separated values of file location of images. |
| ImageName | String | False | Name of the image for which the content is sent in ImageContent. |
| Async | Boolean | False | Enable a background sending mode that is optimized for bulk sending. |
| IpPool | String | False | The name of the dedicated ip pool that should be used to send the message. |
| SendAt | Datetime | False | When this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. |
Result Set Columns
| Name | Type | Description |
| Success | String | Whether the operation was successful. |
| Id | String | the message's unique id. |
| String | The email address of the recipient. | |
| Status | String | The sending status of the recipient. |
| RejectReason | String | the reason for the rejection if the recipient status is 'rejected'. |
| QueuedReason | String | A string that uniquely identifies the campaign associated with a cart |