Skip to content
Snippets Groups Projects
Commit 75236a1a authored by Audrey Hamelers's avatar Audrey Hamelers
Browse files

improve mailer logs

parent e34aad3e
No related branches found
No related tags found
3 merge requests!380Pipeline changes,!379Build step added for the master branch,!378k8s release
......@@ -62,11 +62,16 @@ const sendMail = async (
mailData.bcc = testAddress || bcc
}
const mailerConfig = require(config.get('mailer.path'))
const { transport } = require(config.get('mailer.path'))
logger.info(
`Sending email. Mailer host: ${transport.host}, port: ${transport.port}`,
)
logger.info(
`Trying to send email from host ${mailerConfig.transport.host} port ${mailerConfig.transport.port} from ${mailData.from} to ${mailData.to}`,
`Recipients: ${to}${cc ? `, CC: ${cc}` : ''}${bcc ? `, BCC: ${bcc}` : ''}`,
)
if (testAddress) {
logger.info('Testing! Mail recipients overwritten to', testAddress)
}
return Email.send(mailData)
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment