POST /services/notify/email |
What does it do?
Sends an e-mail to one or multiple recipients.
Requirements
Make sure that Assets Server is configured for sending out e-mails.
Log in requirement
Before being able to request information from Assets Server by using a GET request or make changes to the system through a POST request, a log in to Assets Server is required. For information about the available APIs for logging in, see Assets Server REST API - introduction.
Request JSON body
{
"to" : "info@somebody.com",
"subject": "Test email",
"body" : "Simple plain text body",
"htmlBody" : "<html><body><h1>HTML body</h1></body></html>"
}
JSON body details
Attribute | Required | Description |
---|---|---|
to | yes | Recipient or a comma-separated list of recipients. |
subject | yes | E-mail subject. |
body | no | Plain body text.1 |
htmlBody | no |
HTML body text. 1 |
1 Both body and htmlBody can be specified to have a fallback for e-mail clients that do not understand or accept HTML e-mails.
From address
The 'from' address is defined by the user sending the e-mail (performing the API call). If this is not filled in, it will fall back to an address configured on the server:
#
# Email address from which API emails are sent
#
email.api.from=${serverAdminEmail}
Return value
If the operation succeeds, an empty JSON object with status 200 will be returned. If the operation fails, the JSON object contains information on the error.
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.