Logo Help Center

Elvis 5 REST API - E-mail

Elvis 5 REST API - E-mail

Info: This feature requires Elvis 5.20 or higher.

POST

/services/notify/email

What does it do?

Sends an e-mail to one or multiple recipients.

Requirements

Make sure that Elvis 5 is configured for sending out e-mails.

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.

Was this article helpful?
0 out of 0 found this helpful / Created: / Updated:
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.