Last active
January 23, 2020 23:40
-
-
Save FREEZX/e8e2e6235eb6a258a4c1c90d5ca01891 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import nodemailer from 'nodemailer'; | |
| import nodemailerMock from 'nodemailer-mock'; | |
| import config from './config'; | |
| /** | |
| * Mailer config | |
| */ | |
| let transporter; | |
| if(process.env.NODE_ENV === 'test') { | |
| transporter = nodemailerMock.createTransport(config.mailer); | |
| } else { | |
| transporter = nodemailer.createTransport(config.mailer); | |
| } | |
| export default transporter; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment