Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
protogrid:api_endpoints [2021-12-02 15:39] – [/api/v2/apps/<app_name>/views/<view_name>] dru | protogrid:api_endpoints [2021-12-20 15:38] (current) – [/api/v2/apps/<app_name>/protos/<proto_key>/card-keys] dru | ||
---|---|---|---|
Line 448: | Line 448: | ||
" | " | ||
" | " | ||
+ | " | ||
+ | " | ||
" | " | ||
], | ], | ||
Line 458: | Line 460: | ||
[POST] Send an email | [POST] Send an email | ||
- | To use this endpoint, | + | To be able to use this endpoint, |
- | Protogrid will fist try to establish a TLS session to the specified mail server and authenticate using the supplied credentials. If TLS is not available it will try to connect using SSL. Finally if SSL is not available the function tries to connect using unsecured SMTP protocol. | + | Protogrid will fist try to establish a TLS session to the specified mail relay server and authenticate using the supplied credentials. If TLS is not available it will try to connect using SSL. Finally if SSL is not available the function tries to connect using unsecured SMTP protocol. |
- | If Sender Policy Framework (SPF) is used for the particular | + | The mail will be sent according |
The following JSON data fields can be used: | The following JSON data fields can be used: | ||
Line 493: | Line 495: | ||
url: " | url: " | ||
data: JSON.stringify({ | data: JSON.stringify({ | ||
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
" | " | ||
{" | {" | ||
Line 514: | Line 516: | ||
</ | </ | ||
+ | As a response you receive a JSON with the following structure: | ||
+ | * errors [Array]: Contains information if no single email could be sent, otherwise it is empty. | ||
+ | * messages [Array]: Contains information if Protogrid could not establish the connection to the mail server with the most secure transport encryption, otherwise it is empty. | ||
+ | * result [Object]: Contains information regarding individual recipients to whom the email could not be delivered. If the email could be delivered to all recipients equals to { " | ||
- | Example | + | Example |
<code javascript> | <code javascript> | ||
{ | { | ||
- | | + | |
- | " | + | " |
- | "success": | + | [ |
- | } | + | " |
+ | " | ||
+ | ], | ||
+ | | ||
+ | | ||
+ | | ||
+ | [ | ||
+ | 554, | ||
+ | "5.7.1 < | ||
+ | ] | ||
+ | | ||
} | } | ||
</ | </ |