-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Email client replacement #104
Comments
thats all you need unless there's more you want to provide to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, congratulations for this excelent boilerplate!
I want to know how to use another emailClient in dependencyInjector.ts
For instance, if I'm using Sendgrid I can replace the instance and change the DI, but also need to change the methods in MailerService. So how to make an agnostic MailerService?
bulletproof-nodejs/src/loaders/dependencyInjector.ts
Line 15 in b3d82c1
Replace it with:
const sgInstance = sgMail;
And in the MailerService, need to change the client send method.
bulletproof-nodejs/src/services/mailer.ts
Line 23 in b3d82c1
Replace it with (sendgrid api)
this.emailClient.send(msg)
Is this right? Can you think of any other way or idea?
Thanks a lot.
The text was updated successfully, but these errors were encountered: