Skip to content

Commit

Permalink
Adding config for SMTP_USER and SMTP_PASS
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwalter committed Jun 30, 2021
1 parent 5adbd9a commit 106cfa7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/wet-berries-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ianwalter/nrg": patch
---

Adding config for SMTP_USER and SMTP_PASS
8 changes: 7 additions & 1 deletion packages/nrg/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,13 @@ module.exports = function config (options = {}) {
pool: cfg.isProd,
ignoreTLS: cfg.isDev || cfg.isTest,
host: process.env.SMTP_HOST,
port: process.env.SMTP_PORT
port: process.env.SMTP_PORT,
...(process.env.SMTP_USER || process.env.SMTP_PASS) && {
auth: {
...process.env.SMTP_USER && { user: process.env.SMTP_USER },
...process.env.SMTP_PASS && { pass: process.env.SMTP_PASS }
}
}
}
},
get replyTo () {
Expand Down

0 comments on commit 106cfa7

Please sign in to comment.