Skip to content

Commit

Permalink
fix: don't require smtp credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprobst committed May 23, 2024
1 parent 0a85c95 commit daa385b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/lib/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ export function sendEmail(params: SendEmailParams) {
host: env.EMAIL_SMTP_SERVER,
port: env.EMAIL_SMTP_PORT,
secure: false,
auth: {
user: env.EMAIL_SMTP_USERNAME,
pass: env.EMAIL_SMTP_PASSWORD,
},
auth:
env.EMAIL_SMTP_USERNAME && env.EMAIL_SMTP_PASSWORD
? {
user: env.EMAIL_SMTP_USERNAME,
pass: env.EMAIL_SMTP_PASSWORD,
}
: undefined,
});

return transporter.sendMail({
Expand Down

0 comments on commit daa385b

Please sign in to comment.