Send Email
Overview¶
You can send emails using the "Email Sending API".
Either the email address of the API key's user or SupportFrom in "Mail.json" must be set.
Cautions¶
- Pleasanter versions 1.5.0.0 to 1.5.2.0 have a bug that corrupts attached files. This bug has been fixed in version 1.5.3.0. If you send emails with attachments, do not use Pleasanter versions 1.5.0.0 to 1.5.2.0.
Preparations¶
Please create an "API Key" before performing any API operations.
Request¶
Send JSON data in the following request format:
| Setting column | Value |
|---|---|
| HTTP Method | POST |
| Content-Type | application/json |
| Character Code | UTF-8 |
| URL | http://{server name}/api/items/{record ID}/OutgoingMails/Send 1 |
| Body | Refer to the JSON data below |
Required Columns for JSON Data¶
| Column | Required | Notes |
|---|---|---|
| ApiVersion | Yes | |
| ApiKey | Yes | |
| From | - | |
| To | - | |
| Cc | - | |
| Bcc | - | |
| Title | Yes | |
| Body | - | |
| Attachments | - | Please set the following properties. Name: File name Base64: Base64 encoded string of the attachment ContentType: Content type |
For information about the FixedFrom value, please refer to Mail.json.
Response¶
The JSON data in the following format will be returned and the email will be sent.
Confirmation Column in Case of Error¶
- Precautions when using the API and things to check if an error occurs
- FAQ: What to check if modified configuration files or API requests (JSON format) are not recognized correctly
Supported Versions¶
| Supported Versions | Body |
|---|---|
| 1.2.4.0 and later | Added Attachments |
Related Information¶
- Developer's Guide: API: Create an API Key
- Mail.json
- FAQ: An error occurs when executing the API
- FAQ: What to check if modified configuration files or API requests (JSON format) are not recognized correctly
-
Please edit the {server name} and {record ID} parts to suit your environment as appropriate.
↩
For Pleasanter.net, the format is as follows: