diff --git a/reference/e2e/smoke.spec.ts b/reference/e2e/smoke.spec.ts index d6f91b0..32dee65 100644 --- a/reference/e2e/smoke.spec.ts +++ b/reference/e2e/smoke.spec.ts @@ -252,5 +252,9 @@ test('API: a staff password without the 2FA code opens nothing; with the code it // the secret is stored (create-test-admin.ts) and never returned, also to a fully signed-in admin expect(after.data.SiteIntegration.smtpPassword).toBe('********') expect(JSON.stringify(after)).not.toContain('e2e-sink') + // …and it stays with the server it was saved for: moving the server without typing the password again is refused + const moved = await api.post('/api/globals/site-integrations', { data: { smtpHost: 'elsewhere.example.com' } }) + expect(moved.status()).toBe(400) + expect(await moved.text()).toMatch(/Enter the password again|Wpisz hasło ponownie/) await api.dispose() }) diff --git a/reference/src/payload-types.ts b/reference/src/payload-types.ts index 9abab69..14664dd 100644 --- a/reference/src/payload-types.ts +++ b/reference/src/payload-types.ts @@ -2799,6 +2799,10 @@ export interface SiteIntegration { * Usually 587, or 465. */ smtpPort?: number | null; + /** + * The password is sent only over an encrypted connection; without one, no e-mail is sent. + */ + smtpRequireTls?: boolean | null; smtpUser?: string | null; smtpPassword?: string | null; emailStatus?: { @@ -3220,6 +3224,7 @@ export interface SiteIntegrationsSelect { smtpFromName?: T; smtpHost?: T; smtpPort?: T; + smtpRequireTls?: T; smtpUser?: T; smtpPassword?: T; emailStatus?: