Send Email

This REST API sends an email to specified recipients, optionally attaching files from EPM Cloud. This API can be incorporated into REST API programs and scripts to notify users of various conditions or to send reports.

The API is asynchronous and returns the Job ID. Use the job status URI to determine whether the process is complete. The presence of status -1 in the response indicates that the process is in progress. Any non-zero status except -1 indicates failure.

This REST API is version v1.

Table 6-56 Tasks for Send Email

Task Request REST Resource
Trigger sendmail POST /interop/rest/<api_version>/services/sendmail
Retrieve sendmail status GET /interop/rest/<api_version>/services/jobs/777

REST Resource

POST /interop/rest/<api_version>/services/sendmail

Supported Media Types: application/x-www-form-urlencoded


The following table summarizes the request parameters.

Table 6-57 Parameters

Name Description Type Required Default
api_version Specific API version Path Yes None
to The recipient email addresses separated by semi-colons Form Yes None
subject The subject for the email Form Yes None
body The body of the email providing details. Form No None
attachments One or more file names separated by commas to be added as attachments to the email, for example, outbox/Errorfile.txt or inbox/Errorfile2.txt Form No None



Table 6-58 Parameters

Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can use the href to get the status of the recreate service
data Parameters as key value pairs passed in the request
items Details about the resource
links Details of the first URL to be requested to get the job details; rel is "Job Details"

Example of Response Body in JSON format.

{"status":-1, "items": null, "links":[{"rel":"self", "href":"https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>","data":null,"action":"POST"},{"rel":"Job Status","href":"https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>","data":null,"action":"GET"}],"details":null