settings: add email test note

just send an announcement to yourself.
This commit is contained in:
Harvey Tindall
2025-05-13 17:31:09 +01:00
parent d710b9ad4d
commit 2d98c6cff4
3 changed files with 14 additions and 1 deletions

View File

@@ -79,6 +79,13 @@ func GenericErr(status int, err error) error {
}
}
func GenericErrFromResponse(resp *http.Response, err error) error {
if resp == nil {
return ErrUnknown{code: -2}
}
return GenericErr(resp.StatusCode, err)
}
type ConfigurableTransport interface {
// SetTransport sets the http.Transport to use for requests. Can be used to set a proxy.
SetTransport(t *http.Transport)

View File

@@ -720,6 +720,12 @@ sections:
type: bool
value: false
description: Disables using the same address on multiple accounts.
- setting: test_note
name: 'Test your settings:'
type: note
depends_true: enabled
required: false
description: Go over to the accounts tab, select your user (ensuring you've assigned it an email address) and send yourself an announcement.
- section: mailgun
meta:
name: Mailgun (Email)

View File

@@ -87,7 +87,7 @@ func (js *Jellyseerr) req(mode string, uri string, data any, queryParams url.Val
}
}
resp, err := js.httpClient.Do(req)
err = co.GenericErr(resp.StatusCode, err)
err = co.GenericErrFromResponse(resp, err)
defer js.timeoutHandler()
var responseText string
defer resp.Body.Close()