Skip to content

Commit

Permalink
Merge pull request #19 from RadarDAO-xyz/chore/stop-sending-emails-on…
Browse files Browse the repository at this point in the history
…-dev

chore: add node env check for sendEmail
  • Loading branch information
marcuspang authored Oct 17, 2023
2 parents 49f9ff9 + 4ab9414 commit 23f61d3
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/util/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ export const EmailTemplates = {
};

export function sendMail(options: Mail.Options) {
return mailTransporter.sendMail({
from: 'RADAR Launch <[email protected]>',
bcc: '[email protected], [email protected]',
...options
});
if (process.env.NODE_ENV === 'production') {
return mailTransporter.sendMail({
from: 'RADAR Launch <[email protected]>',
bcc: '[email protected], [email protected]',
...options
});
}
console.log('Not sending email in development mode.', options);
}

0 comments on commit 23f61d3

Please sign in to comment.