# API: Send message
# sendMessage
Send message from HostBill
# Optional parameters
Parameter | Description |
---|---|
subject | Message subject. Required if no template is set |
body | Message body. Required if no template is set |
to | Recipient address, use ; to separate multiple recipients. Required if no client_id is set |
client_id | ID of the client to whom the message will be sent |
sender | Sender ID that will be used to send the message |
template | Template ID that will be used to send the message |
use_variables | Set to 1 to use variables |
html | Set to 1 to send message as HTML |
notify | Set to 1 to add portal notification |
replyto | Reply-to email address |
from2 | From: Email address |
from1 | From: Sender Name |
variables | Additional variables to be passed to template. e.g. 'variables' => ['service' => ['id' => 10, 'domain' => 'google.com']]] |
email_override | Email for which email will be sent (overwrites client email value). The option is only taken into account if 'client_id' is set |
brand_id | Brand ID to be used when sending a message |
# Request
GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=sendMessage
# PHP Samples
# Response
{
"success": true,
"sent": true,
"call": "sendMessage",
"server_time": 1484990422
}