resetSmtpSettings
SmtpSettingsWrapper resetSmtpSettings()
DELETE /api/2.0/smtpsettings/smtp
Reset SMTP settings
Deletes the SMTP settings of this portal and puts it back on the mail configuration of the installation, so the portal stops using the relay saved by POST api/2.0/smtpsettings/smtp. Nothing has to be called first; the caller needs the portal-settings right of a DocSpace administrator, and the SMTP settings section has to be enabled for the portal, otherwise the call is answered with 402. The call is destructive and cannot be undone - the host, the sender identity and the credentials are gone and have to be entered again - but it is idempotent, and on a portal that has no settings of its own it changes nothing. Portal mail itself keeps working as long as the installation has a relay of its own configured. The answer holds the settings that are in force after the reset, always with isDefaultSettings true: the server-wide values in a standalone installation, an empty settings object in a cloud portal, and an empty credentialsUserPassword in both. Read them back at any time with GET api/2.0/smtpsettings/smtp.
Parameters
This endpoint does not need any parameter.
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The settings in force after the reset - the configuration of the installation, or an empty settings object in a cloud portal | SmtpSettingsWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 402 | The SMTP settings section is not enabled for this portal | - | - |
| 403 | The caller has no portal-settings right | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 500 | Internal Server Error. | ErrorApiResponse | - |
| 502 | Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
| 503 | Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
Return type
Authorization
Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId
HTTP request headers
- Content-Type: Not defined
- Accept: application/json