POST email/send?Token={Token}
Send e-mail using SMTP configuration of the application server (Application configuration - SMTP). Application privilege "View" for agenda "Application configuration" required. Each sending is logged into the journal.
Request Information
Authorization
- Authorization by token required
Availability
- Method can be used
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| Token |
The action is authorized by this token. Token should generated by calling action "POST login". Expiration time of each token is 20 seconds |
globally unique identifier |
Required |
Body Parameters
EmailSendReq| Name | Description | Type | Additional information |
|---|---|---|---|
| To |
Recipient e-mail addresses. At least one address is required. |
Collection of string |
Required |
| Cc |
Copy (Cc) recipient e-mail addresses. |
Collection of string |
None. |
| Bcc |
Blind copy (Bcc) recipient e-mail addresses. |
Collection of string |
None. |
| Subject |
E-mail subject. |
string |
Required |
| Body |
E-mail text. |
string |
Required |
| IsBodyHtml |
The e-mail text is in HTML format. Default is plain text. |
boolean |
None. |
Request Formats
application/json
Sample:
{"To":["john.doe@example.com"],"Cc":["jane.doe@example.com"],"Bcc":["archive@example.com"],"Subject":"Subject of the e-mail","Body":"Text of the e-mail","IsBodyHtml":false}
application/xml
Sample:
<EmailSendReq>
<To>
<string>john.doe@example.com</string>
</To>
<Cc>
<string>jane.doe@example.com</string>
</Cc>
<Bcc>
<string>archive@example.com</string>
</Bcc>
<Subject>Subject of the e-mail</Subject>
<Body>Text of the e-mail</Body>
<IsBodyHtml>false</IsBodyHtml>
</EmailSendReq>
Response Information
Response Codes
| Http Code | Error Number | Description |
|---|---|---|
| 200 request succesfully done | 0 | Processed with result: ExecOK |
| 400 bad request | 1002 | Entry parameter missing or parameter bindigs failed |
| 400 bad request | 2400 | No e-mail recipient specified |
| 400 bad request | 2401 | Invalid e-mail address [{0}] |
| 401 unauthorized | 1000 | Token {0} not found |
| 401 unauthorized | 1001 | Token {0} already expired |
| 401 unauthorized | 1006 | Ip filter violated for ip client address [{0}] |
| 401 unauthorized | 1007 | Ip filter [{0}] parsing failed |
| 401 unauthorized | 1008 | Request rate policy violated for [{0}] |
| 403 server refuses fo fulfill the request | 2403 | Application privilege View for agenda Application configuration violated |
| 415 unsupported Media Type | The request entity has a media type which the server or resource does not support. Only application/json and application/xml are supported | |
| 500 internal error | 2402 | Sending e-mail failed. Issue: [{0}] |
| 500 internal error | Server exception description |
Resource Description
BaseRespOfEmailSendReq| Name | Description | Type | Additional information |
|---|---|---|---|
| Result | RequestResult |
None. |
|
| Request | EmailSendReq |
None. |
Response Formats
application/json
Sample:
{"Result":{"Message":"Processed with result: ExecOK","Code":0,"ModelStateErr":null},"Request":{"To":["john.doe@example.com"],"Cc":["jane.doe@example.com"],"Bcc":["archive@example.com"],"Subject":"Subject of the e-mail","Body":"Text of the e-mail","IsBodyHtml":false}}
application/xml
Sample:
<Response>
<Result>
<Message>Processed with result: ExecOK</Message>
<Code>0</Code>
</Result>
<Request>
<To>
<string>john.doe@example.com</string>
</To>
<Cc>
<string>jane.doe@example.com</string>
</Cc>
<Bcc>
<string>archive@example.com</string>
</Bcc>
<Subject>Subject of the e-mail</Subject>
<Body>Text of the e-mail</Body>
<IsBodyHtml>false</IsBodyHtml>
</Request>
</Response>