Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
%%[
VAR @ts, @tsDef, @ts_extkey, @ts_email, @ts_sub, @ts_statusCode, @ts_statusMsg, @errorCode
SET @ts = CreateObject("TriggeredSend")
SET @tsDef = CreateObject("TriggeredSendDefinition")
SET @ts_extkey = "ExternalKey" /* use the external key of the interaction for example SET @ts_extkey = "49078" */
SET @ts_email = "email@example.com" /* provide recipient's email address */
SetObjectProperty(@tsDef, "CustomerKey", @ts_extkey)
SetObjectProperty(@ts, "TriggeredSendDefinition", @tsDef)
SET @ts_sub = CreateObject("Subscriber")
SetObjectProperty(@ts_sub, "EmailAddress", @ts_email)
SetObjectProperty(@ts_sub, "SubscriberKey", @ts_email)
AddObjectArrayItem(@ts, "Subscribers", @ts_sub)
Output(InvokeCreate(@ts, @ts_statusMsg, @errorCode))
]%%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.