Перейти до вмісту

Send an e-mail

Цей контент ще не доступний вашою мовою.

sendEMail sends an e-mail through the mail server set in System Management → System Parameters → Billing, SMTP Server, the same server the switch uses for invoices and notifications. Use it to send reports or alerts from your scripts without a mail server of your own.

Name Type Required Description
from string yes Sender address
to string yes Recipients, comma-separated
cc string yes Copy recipients, comma-separated. Pass an empty string for none
bcc string yes Blind copy recipients, comma-separated. Pass an empty string for none
subject string yes Subject
body string yes Text of the message
Name Type Description
result string OK when the message was sent
request
call("sendEMail", {
"from": "noc@example.com",
"to": "ops@example.com,billing@example.com",
"cc": "",
"bcc": "",
"subject": "Daily traffic report",
"body": "Calls: 18,240\nMinutes: 61,905\n",
})
response
{"result": "OK"}