email.send
The email.send command is used to send an email to one or more email addresses from a registered user's account email address in Device Cloud.
TR50 Request
{
"cmd" : {
"command" : "email.send",
"params" : {
"to" : [ "user@example.com", "other@example.com", "one_more@example.com" ],
"from" : "real_user@example.com",
"subject" : "Hello World!",
"body" : "This is an email message sent by the API."
}
}
}
Request Parameters
Name |
Type |
Required |
Description |
---|---|---|---|
to |
Array |
Yes |
The recipient(s) of the email. Can be an array of email addresses, or a string containing the key of a notification group. |
from |
String |
|
The sender's email address. |
fromName |
String |
|
The name of the the sender. |
subject |
String |
|
The subject of the email. |
body |
String |
Yes |
The body of the email. |
html |
Boolean |
|
Whether the email is in HTML format. |
TR50 Response
If the command is sent successfully a success message is returned. Success is returned even for a partial success. Otherwise, an error and error message will be returned.
{
"cmd": {
"success": true
}
}
Response Parameters
Name |
Type |
Description |
---|---|---|
failures |
Array |
Any failures that occurred, if there was a partial success. |