fix: Remove email validation to allow for Name <email> format
This commit is contained in:
@@ -70,7 +70,7 @@ export class Mailer {
|
|||||||
try {
|
try {
|
||||||
Logger.info("email", `Sending email "${data.subject}" to ${data.to}`);
|
Logger.info("email", `Sending email "${data.subject}" to ${data.to}`);
|
||||||
const info = await transporter.sendMail({
|
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,
|
replyTo: env.SMTP_REPLY_EMAIL ?? env.SMTP_FROM_EMAIL,
|
||||||
to: data.to,
|
to: data.to,
|
||||||
subject: data.subject,
|
subject: data.subject,
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import {
|
|||||||
IsNumber,
|
IsNumber,
|
||||||
IsIn,
|
IsIn,
|
||||||
IsBoolean,
|
IsBoolean,
|
||||||
IsEmail,
|
|
||||||
Contains,
|
Contains,
|
||||||
MaxLength,
|
MaxLength,
|
||||||
} from "class-validator";
|
} from "class-validator";
|
||||||
@@ -262,7 +261,6 @@ export class Environment {
|
|||||||
/**
|
/**
|
||||||
* The email address from which emails are sent.
|
* The email address from which emails are sent.
|
||||||
*/
|
*/
|
||||||
@IsEmail()
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
public SMTP_FROM_EMAIL = process.env.SMTP_FROM_EMAIL;
|
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
|
* The reply-to address for emails sent from Outline. If unset the from
|
||||||
* address is used by default.
|
* address is used by default.
|
||||||
*/
|
*/
|
||||||
@IsEmail()
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
public SMTP_REPLY_EMAIL = process.env.SMTP_REPLY_EMAIL;
|
public SMTP_REPLY_EMAIL = process.env.SMTP_REPLY_EMAIL;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user