diff --git a/frontend/src/lib/components/instanceSettings.ts b/frontend/src/lib/components/instanceSettings.ts index 9e67ff585c..2b59f64f75 100644 --- a/frontend/src/lib/components/instanceSettings.ts +++ b/frontend/src/lib/components/instanceSettings.ts @@ -140,6 +140,21 @@ export const settings: Record = { !value?.endsWith('/') && !value?.endsWith(' ')) }, + { + label: 'Email domain', + description: 'Domain to display in webhooks for email triggers (should match the MX record)', + key: 'email_domain', + fieldType: 'text', + placeholder: 'mail.windmill.com', + storage: 'setting', + error: 'Must be a valid domain', + isValid: (value: string | undefined) => + value == undefined || + value === '' || + /^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*$/.test( + value + ) + }, { label: 'Request size limit in MB', description: 'Maximum size of HTTP requests in MB.',