Skip to content
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

Unable to set .env SMTP_SECURED to false #1117

Closed
ivoloshin opened this issue Mar 7, 2018 · 2 comments
Closed

Unable to set .env SMTP_SECURED to false #1117

ivoloshin opened this issue Mar 7, 2018 · 2 comments

Comments

@ivoloshin
Copy link

ivoloshin commented Mar 7, 2018

When setting SMTP_SECURED=false, dotenv treats all values as string.

Then it's used as a bool in lib/connections/nodemailer.js like so:

const smtpConfig = {
  host: process.env.SMTP_HOST,
  port: process.env.SMTP_PORT,
  secure: process.env.SMTP_SECURED,
  auth: {
    user: process.env.SMTP_USER,
    pass: process.env.SMTP_PASS
  }
};

I'm pretty sure it's always true in this case... It makes it not possible to set to false.

Also, please add ignoreTLS value to smtpConfig parameters so we can use simple email relay servers for internal LRSes.

Thanks!

@ht2
Copy link
Contributor

ht2 commented Mar 27, 2018

Hi @ivoloshin,

I've patched in this PR and added the TLS flags as well. Should be released as v2.2.2 shortly once tests pass.

@ht2
Copy link
Contributor

ht2 commented Apr 1, 2018

@ht2 ht2 closed this as completed Apr 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants