Send Email (v1)
This topic describes the original version of this REST API. You can also use the simplified v2 version of the REST API. The v2 version contains all parameters in the payload and does not require URL encoding while calling the REST APIs. This makes the v2 API easier to use. The v2 version is backwards compatible.
REST Resource
POST /interop/rest/v1/services/sendmail
Table 9-106 Tasks
| Task | Request | REST Resource |
|---|---|---|
Trigger sendmail |
POST | /interop/rest/v1/services/sendmail |
Retrieve sendmail status
|
GET | /interop/rest/v1/services/jobs/777 |
Request
Supported Media Types: application/x-www-form-urlencoded
Table 9-107 Parameters
| Name | Description | Type | Required | Default |
|---|---|---|---|---|
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 | Yes | 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.txtYou can attach any file up to 10 MB in size, other than a snapshot, that is available in Oracle Fusion Cloud Enterprise Performance Management environments. |
Form | No | None |
Sample Request Payload
{
"to": "<EMAIL>",
"subject": "<SUBJECT>",
"body": "<BODY>",
"parameters": {
"attachments": "<ATTACHMENT>"
}
}
Response
Table 9-108 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
|
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
{
"details": null,
"status": -1,
"items": null,
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v1/services/sendmail",
"action": "POST",
"rel": "self",
"data": null
},
{
"href": "https://<BASE-URL>/interop/rest/v1/services/jobs/<JOB-ID>",
"action": "GET",
"rel": "Job Status",
"data": null
}
]
}
Sample cURL Command
curl -s -u <USERNAME>:<PASSWORD> -H 'Content-Type: application/x-www-form-urlencoded' --request POST https://<BASE-URL>/interop/rest/v1/services/sendmail -d 'to=<EMAIL>&subject=<SUBJECT>&body=<BODY>&attachment=<ATTACHMENT>'