diff --git a/apps/api/src/Email/Send.ts b/apps/api/src/Email/Send.ts index 449958d..2532204 100644 --- a/apps/api/src/Email/Send.ts +++ b/apps/api/src/Email/Send.ts @@ -86,7 +86,7 @@ export async function sendEmail(options: { const USING_GMAIL = SMTPConfig.host === 'smtp.gmail.com'; - const config: Record = { + let config: Record = { host: SMTPConfig.host, port: SMTPConfig.port, secure: SMTPConfig.secure, @@ -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;