1
0
Fork 0
mirror of synced 2024-07-06 06:50:49 +12:00
budibase/packages/server/__mocks__/@sendgrid/mail.js

19 lines
252 B
JavaScript

class Email {
constructor() {
this.apiKey = null
}
setApiKey(apiKey) {
this.apiKey = apiKey
}
async send(msg) {
if (msg.to === "invalid@test.com") {
throw "Invalid"
}
return msg
}
}
module.exports = new Email()