feat: show email creds when explicitly set to 'mock'

This commit is contained in:
Elliot DeNolf
2020-11-17 17:33:05 -05:00
parent 83d32e4449
commit dbd305acc5
3 changed files with 7 additions and 9 deletions

View File

@@ -5,8 +5,13 @@ const mockHandler = require('./mockHandler');
async function buildEmail() {
if (!this.config.email.transport || this.config.email.transport === 'mock') {
logger.info('E-mail configured with mock configuration');
// TODO: Log mock e-mail credentials here as well?
const mockAccount = await mockHandler(this.config.email);
if (this.config.email.transport === 'mock') {
const { account: { web, user, pass } } = mockAccount;
logger.info(`Log into mock email provider at ${web}`);
logger.info(`Mock email account username: ${user}`);
logger.info(`Mock email account password: ${pass}`);
}
return mockAccount;
}