Send Email

Last Updated on : 2023-06-20 12:39:04download

Send verification codes, notifications, or marketing emails to users.

API address

POST: /v1.0/iot-03/messages/mails/actions/push

Request parameter

Description of body

Parameter name Type IN Required Description
to_address String true The receiver’s address.
template_id String true The approved email template ID.
template_param String false The actual value corresponding to the email template variable, in the JSON format.
reply_to_address String false The email address to which the reply is sent.

Return parameter

Parameter name Type Description
result MsgPushRes

Description of result

Parameter name Type Description
send_status Boolean The status of sending.

Request example

POST: /v1.0/iot-03/messages/mails/actions/push
{ "to_address": "test@example.com", "reply_to_address": "test@example.com", "template_id": "MAIL_1616396456", "template_param": "{\"code\":\"1234\"}" }

Return example

{ "result": { "send_status": true }, "t": 1586153261345, "success": true }

Error code

For more information, see error code.