Files
medreport_mrb2b/packages/mailers/shared/src/schema/smtp-config.schema.ts
Helena 9122acc89f MED-151: add profile view and working smoking dashboard card (#71)
* MED-151: add profile view and working smoking dashboard card

* update zod

* move some components to shared

* move some components to shared

* remove console.logs

* remove unused password form components

* only check null for variant

* use pathsconfig
2025-09-04 12:17:54 +03:00

23 lines
842 B
TypeScript

import 'server-only';
import { z } from 'zod';
export const SmtpConfigSchema = z.object({
user: z.string({
error: `Please provide the variable EMAIL_USER`,
})
.describe('This is the email account to send emails from. This is specific to the email provider.'),
pass: z.string({
error: `Please provide the variable EMAIL_PASSWORD`,
}).describe('This is the password for the email account'),
host: z.string({
error: `Please provide the variable EMAIL_HOST`,
}).describe('This is the SMTP host for the email provider'),
port: z.number({
error: `Please provide the variable EMAIL_PORT`,
}).describe('This is the port for the email provider. Normally 587 or 465.'),
secure: z.boolean({
error: `Please provide the variable EMAIL_TLS`,
}).describe('This is whether the connection is secure or not'),
});