api_send

Description

Makes an API send request.

 api_send( string template [, string email [,  object vars [, string schedule_time [, object options [, object evars ]]]]] )
 api_send( object parameters)

This is for use only within a trigger custom zephyr script.

Make a send API Request:

    • templateName of the valid template
    • emailthe email address to send to; if multi-send, use comma separated email strings
    • varsa key/value hash of the replacement vars to use in the send. Each var may be referenced as {varname} within the template itself
    • schedule_timedo not send the email immediately, but at some point in the future. Any date recognized by PHP’s strtotime function is valid, but be sure to specify timezone or use a UTC time to avoid confusion
    • optionsA key/value hash containing all or one of the following keys: replytotest or behalf_email
    • evarsApplicable only for multi-send; A Key/value hash where each key is an email address, and each value is a key/value hash of variables for that particular email address

This function is basically a Send API call in POST mode

Example

{api_send('template_name')}
Description: Send email to specific template using given user profile email

{api_send('template_name', 'praj@sailthru.com,ian@sailthru.com')}
Description: Send multiple emails to given template

{api_send('template_name', email + ',praj@sailthru.com')}
Description: Send multiple emails to given template using custom email and user profile email

{api_send({'template':'template_name', 'email':email + ',praj@sailthru.com'})}
Description: Send multiple emails to given template using custom email and user profile email utilizing a map instead of order of parameters

Top