From 2a6d6f58042b477b0c175a95b554066fced6a572 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 21 May 2022 14:01:57 +0100 Subject: [PATCH] chore: Restore more flexible SMTP env email validation --- server/env.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/env.ts b/server/env.ts index a02ef5c58..ad5a5b416 100644 --- a/server/env.ts +++ b/server/env.ts @@ -14,6 +14,7 @@ import { Equals, IsNumber, IsIn, + IsEmail, IsBoolean, Contains, MaxLength, @@ -261,6 +262,7 @@ export class Environment { /** * The email address from which emails are sent. */ + @IsEmail({ allow_display_name: true, allow_ip_domain: true }) @IsOptional() public SMTP_FROM_EMAIL = process.env.SMTP_FROM_EMAIL; @@ -268,6 +270,7 @@ export class Environment { * The reply-to address for emails sent from Outline. If unset the from * address is used by default. */ + @IsEmail({ allow_display_name: true, allow_ip_domain: true }) @IsOptional() public SMTP_REPLY_EMAIL = process.env.SMTP_REPLY_EMAIL;