Skip to content

Commit e7b28f1

Browse files
committed
add warning if email env vars arent set
1 parent 4d67780 commit e7b28f1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/web/src/actions.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,8 @@ export const createInvites = async (emails: string[], domain: string): Promise<{
10141014
console.error(`Failed to send invite email to ${email}: ${failed}`);
10151015
}
10161016
}));
1017+
} else {
1018+
console.warn(`SMTP_CONNECTION_URL or EMAIL_FROM_ADDRESS not set. Skipping invite email to ${emails.join(", ")}`);
10171019
}
10181020

10191021
return {
@@ -1542,6 +1544,8 @@ export const createAccountRequest = async (userId: string, domain: string) => se
15421544
console.error(`Failed to send account request email to ${owner.email}: ${failed}`);
15431545
}
15441546
}
1547+
} else {
1548+
console.warn(`SMTP_CONNECTION_URL or EMAIL_FROM_ADDRESS not set. Skipping account request email to owner`);
15451549
}
15461550
}
15471551

@@ -1629,6 +1633,8 @@ export const approveAccountRequest = async (requestId: string, domain: string) =
16291633
if (failed.length > 0) {
16301634
console.error(`Failed to send approval email to ${request.requestedBy.email}: ${failed}`);
16311635
}
1636+
} else {
1637+
console.warn(`SMTP_CONNECTION_URL or EMAIL_FROM_ADDRESS not set. Skipping approval email to ${request.requestedBy.email}`);
16321638
}
16331639

16341640
return {

0 commit comments

Comments
 (0)