From 196cd88b1c7c44a337ca12f6a804f1bb7fa83c4a Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 14 Mar 2023 17:11:04 +0100 Subject: [feature] Allow admins to send test emails (#1620) * [feature] Allow admins to send test emails * implement unwrap on new error type * add + use gtserror types * GoToSocial Email Test -> GoToSocial Test Email * add + use getInstance db call * removed unused "unknown" error type --- docs/api/swagger.yaml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'docs/api') diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml index 28e17d580..e0a61012a 100644 --- a/docs/api/swagger.yaml +++ b/docs/api/swagger.yaml @@ -3695,6 +3695,46 @@ paths: summary: View domain block with the given ID. tags: - admin + /api/v1/admin/email/test: + post: + consumes: + - multipart/form-data + description: |- + This can be used to validate an instance's SMTP configuration, and to debug any potential issues. + + If an error is returned by the SMTP connection, this handler will return code 422 to indicate that + the request could not be processed, and the SMTP error will be returned to the caller. + operationId: testEmailSend + parameters: + - description: The email address that the test email should be sent to. + in: formData + name: email + type: string + produces: + - application/json + responses: + "202": + description: Test email was sent. + "400": + description: bad request + "401": + description: unauthorized + "403": + description: forbidden + "404": + description: not found + "406": + description: not acceptable + "422": + description: An smtp occurred while the email attempt was in progress. Check the returned json for more information. The smtp error will be included, to help you debug communication with the smtp server. + "500": + description: internal server error + security: + - OAuth2 Bearer: + - admin + summary: Send a generic test email to a specified email address. + tags: + - admin /api/v1/admin/media_cleanup: post: consumes: -- cgit v1.2.3