Skip to content

Commit

Permalink
fix for sendgrid and possibly others
Browse files Browse the repository at this point in the history
  • Loading branch information
sinamics committed Nov 16, 2023
1 parent 16225f5 commit 6979b8f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/utils/mail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,23 @@ export function createTransporter(globalOptions: GlobalOptions) {
generateInstanceSecret(SMTP_SECRET),
);
}

return nodemailer.createTransport({
host: globalOptions.smtpHost,
port: globalOptions.smtpPort,
secure: globalOptions.smtpSecure,
secure: globalOptions.smtpUseSSL,
auth: {
user: globalOptions.smtpEmail,
user: globalOptions.smtpUsername,
pass: globalOptions.smtpPassword,
},
tls: {
rejectUnauthorized: false,
rejectUnauthorized: true,
minVersion: "TLSv1.2",
},
} as TransportOptions);
}

interface SendMailResult {
accepted: string[];
// add other properties as needed
}

export async function sendEmail(
Expand Down

0 comments on commit 6979b8f

Please sign in to comment.