mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Log email content if Sendgrid api key not set
This commit is contained in:
parent
18b26f9690
commit
d86a6038ea
1 changed files with 2 additions and 1 deletions
|
|
@ -23,7 +23,8 @@ const asSendGridError = (error: any): SendGridError | undefined => {
|
|||
export const sendEmail = async (msg: MailDataRequired): Promise<boolean> => {
|
||||
const client = new MailService()
|
||||
if (!process.env.SENDGRID_MSGS_API_KEY) {
|
||||
throw new Error('Sendgrid API key not set')
|
||||
console.log('SendGrid API key not set.\nSending email:', msg)
|
||||
return true
|
||||
}
|
||||
|
||||
client.setApiKey(process.env.SENDGRID_MSGS_API_KEY)
|
||||
|
|
|
|||
Loading…
Reference in a new issue