MCPcopy
hub / github.com/pocketbase/pocketbase / settingsTestEmail

Function settingsTestEmail

apis/settings.go:100–120  ·  view source on GitHub ↗
(e *core.RequestEvent)

Source from the content-addressed store, hash-verified

98}
99
100func settingsTestEmail(e *core.RequestEvent) error {
101 form := forms.NewTestEmailSend(e.App)
102
103 // load request
104 if err := e.BindBody(form); err != nil {
105 return e.BadRequestError("An error occurred while loading the submitted data.", err)
106 }
107
108 // send
109 if err := form.Submit(); err != nil {
110 // form error
111 if fErr, ok := err.(validation.Errors); ok {
112 return e.BadRequestError("Failed to send the test email.", fErr)
113 }
114
115 // mailer error
116 return e.BadRequestError("Failed to send the test email. Raw error: \n"+err.Error(), nil)
117 }
118
119 return e.NoContent(http.StatusNoContent)
120}
121
122func settingsGenerateAppleClientSecret(e *core.RequestEvent) error {
123 form := forms.NewAppleClientSecretCreate(e.App)

Callers

nothing calls this directly

Calls 6

SubmitMethod · 0.95
NewTestEmailSendFunction · 0.92
BindBodyMethod · 0.80
BadRequestErrorMethod · 0.80
NoContentMethod · 0.80
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…