From 96a32c98e7fb2384b77c4f8ccb3041bab6c63a67 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Fri, 20 May 2022 22:18:21 +0100 Subject: [PATCH] fix: Remove email validation to allow for Name format --- server/emails/mailer.tsx | 2 +- server/env.ts | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/server/emails/mailer.tsx b/server/emails/mailer.tsx index 144bf56ae..a5309ff63 100644 --- a/server/emails/mailer.tsx +++ b/server/emails/mailer.tsx @@ -70,7 +70,7 @@ export class Mailer { try { Logger.info("email", `Sending email "${data.subject}" to ${data.to}`); const info = await transporter.sendMail({ - from: env.SMTP_FROM_EMAIL, + from: `Outline <${env.SMTP_FROM_EMAIL}>`, replyTo: env.SMTP_REPLY_EMAIL ?? env.SMTP_FROM_EMAIL, to: data.to, subject: data.subject, diff --git a/server/env.ts b/server/env.ts index 7c59caae5..a02ef5c58 100644 --- a/server/env.ts +++ b/server/env.ts @@ -15,7 +15,6 @@ import { IsNumber, IsIn, IsBoolean, - IsEmail, Contains, MaxLength, } from "class-validator"; @@ -262,7 +261,6 @@ export class Environment { /** * The email address from which emails are sent. */ - @IsEmail() @IsOptional() public SMTP_FROM_EMAIL = process.env.SMTP_FROM_EMAIL; @@ -270,7 +268,6 @@ export class Environment { * The reply-to address for emails sent from Outline. If unset the from * address is used by default. */ - @IsEmail() @IsOptional() public SMTP_REPLY_EMAIL = process.env.SMTP_REPLY_EMAIL;