POST/users/{userId}/mail
メールを送信する。
インライン画像付きのメールを送信するには :
- メール本文のインラインイメージを挿入する位置に、src 属性として一意の値を cid の値を持つ img タグを追加する
- 例)
<img src="cid:reddotiVBORw0KGgoAAAA" alt="Red dot"/>- cid に上で指定した一意の値、data に画像データを base64 エンコードした文字列、fileType に contentType、inline に true を指定したオブジェクトを attachments に追加する
Access Token を指定します。
指定の方法や Access Token の取得方法は 共通仕様 を参照してください。
| Parameter | Type | Description |
|---|---|---|
| userId | string | ユーザーを特定する ID (URL エンコードする)
required example : me |
| Header | type | Description |
|---|---|---|
| Authorization | string | Bearer {token} required |
| Content-Type | string | application/json required example : application/json |
| Property | Type | Description |
|---|---|---|
| to | string | To メールアドレス (";" で複数指定可能) required minLength : 1 example : admin@example.com; admin1@example.com |
| cc | string | Cc メールアドレス (";" で複数指定可能) example : admin@example.com; admin1@example.com |
| bcc | string | Bcc メールアドレス (";" で複数指定可能) example : admin@example.com; admin1@example.com |
| subject | string | 件名 required minLength : 1 |
| body | string | 本文 minLength : 0 |
| contentType | string | 本文形式
default : html minLength : 1 Allowed values : html, text |
| userName | string | 送信者名 minLength : 1 |
| isSaveSentMail | boolean | 送信済みメールフォルダへの保存フラグ
default : true |
| isSaveTracking | boolean | 送信確認フォルダへの保存フラグ
default : true |
| isSendSeparately | boolean | 個別送信フラグ
default : false |
| securityLevel | string | 情報レベル
default : General Allowed values : General, Restricted, Confidential |
| attachments | array (AttachmentFile) | 添付ファイル情報 minItems : 0 uniqueItems : false |
| Property | Type | Description |
|---|---|---|
| data | string | 添付ファイルのデータ (Base64 でエンコードされたデータ) minLength : 1 |
| filename | string | ファイル名 minLength : 1 maxLength : 250 |
| fileType | string | ファイル contentType minLength : 1 |
| cid | string | Content-ID (インライン画像の場合に指定) |
| inline | boolean | インライン画像フラグ default : false |
example
1{2 "to": "admin@example.com",3 "subject": "タイトル",4 "body": "本文",5 "contentType": "html",6 "userName": "admin",7 "isSaveSentMail": true,8 "isSaveTracking": true,9 "isSendSeparately": false,10 "attachments": [11 {12 "filename": "index.html",13 "fileType": "text/html",14 "data": "PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImphIj4KPGhlYWQ+Cjx0aXRsZT5XZWxjb21lIHRvIFdPUktTIEFQSTwvdGl0bGU+CjwvaGVhZD4KPGJvZHk+CjxoMT5XZWxjb21lIFRvIFdPUktTIEFQSTwvaDE+CldlbGNvbWUgdG8gdGhlIFdPUktTIEFQSSB3b3JsZC4KPC9ib2R5Pgo8L2h0bWw+"15 }16 ]17}Accepted
Bad Request
Forbidden
Internal Server Error