Skip to content

Commit

Permalink
bruh
Browse files Browse the repository at this point in the history
  • Loading branch information
Tolfx committed Sep 8, 2023
1 parent 776edad commit 407decd
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion apps/api/src/Email/Send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export async function sendEmail(options: {

const USING_GMAIL = SMTPConfig.host === 'smtp.gmail.com';

const config: Record<string, any> = {
let config: Record<string, any> = {
host: SMTPConfig.host,
port: SMTPConfig.port,
secure: SMTPConfig.secure,
Expand All @@ -102,6 +102,18 @@ export async function sendEmail(options: {
}
};

if (USING_GMAIL) {
config = {
host: SMTPConfig.host,
port: SMTPConfig.port,
secure: SMTPConfig.secure,
auth: {
user: SMTPConfig.username,
pass: SMTPConfig.password
}
};
}

const email: {
from: string;
to: string;
Expand Down

0 comments on commit 407decd

Please sign in to comment.