https://<subdomain>.sendsmaily.net/api/autoresponder.php


POST method must be used for this query.


Parameters

All parameters must be URL encoded.


Parameter

Value

autoresponder

Autoresponder ID. Required.

addresses

Array of email addresses the autoresponder is being sent to. Required. See the structure of array below under “Parameter structure of addresses”.

from

Override autoresponder's default From address for contacts in addresses array.

from_name

Override autoresponder's default From name for contacts in addresses array.


Parameter structure of addresses:


Parameter

Value

email

Email address. Required.

...

Custom fields. New fields are added automatically to the subscriber. Text.


If the query succeeds, cleaned and repaired email addresses are replied in return.


Example query:

   

$username = 'YOUR_USERNAME';
$password = 'YOUR_PASSWORD';
$location = 'https://<subdomain>.sendsmaily.net/api/autoresponder.php';
$query = array(
  'autoresponder' => 1,
  'from' => 'support+urgent@smaily.com',
  'from_name' => '[URGENT] Support',
  'addresses' => array(
    array(
      'email' => 'support@smaily.com',
    ),
    array(
      'email' => 'info@smaily.com',
      'name' => 'Smaily',
    ),
  ),
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $location);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($query));
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");

$result = curl_exec($ch);
curl_close($ch);

   

Successful results of the query are for example:

  

{
  'code': 101,
  'message': 'OK',
  'addresses': ['support@smaily.com', 'info@smaily.com']
}

   

See also other possible results from Possible results.