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

Allow SMTP connection without auth #3740

Closed
xavier-calland opened this issue Jul 20, 2022 · 3 comments
Closed

Allow SMTP connection without auth #3740

xavier-calland opened this issue Jul 20, 2022 · 3 comments

Comments

@xavier-calland
Copy link
Contributor

Describe the bug
It's not possible to use a SMTP server with anonymous connecion (like a local SMTP relay)

To Reproduce
Steps to reproduce the behavior:

  1. Configure n8n with N8N_SMTP_HOST, N8N_SMTP_PORT and N8N_SMTP_SENDER but no N8N_SMTP_USER nor N8N_SMTP_PASS
  2. Start n8n
  3. Go to "User management"
  4. The message "Set up SMTP before adding users (so that n8n can send them invitation emails)" is displayed and it is not possible to invite users.

Expected behavior
Allow SMTP configuration without configuration.

xavier-calland added a commit to xavier-calland/n8n that referenced this issue Jul 20, 2022
- do not check for user/pass in isEmailSetUp
- do not pass an "auth" property to nodemailer if no user/pass

Issue: n8n-io#3740
xavier-calland added a commit to xavier-calland/n8n that referenced this issue Jul 20, 2022
- do not check for user/pass in isEmailSetUp
- do not pass an "auth" property to nodemailer if no user/pass

Issue: n8n-io#3740
@nepodev
Copy link

nepodev commented Jul 25, 2022

You can enter dummy values for N8N_SMTP_USER and N8N_SMTP_PASS. If your SMTP server does not ask for a user and password, the values are not used. Works for my local SMTP.

@xavier-calland
Copy link
Contributor Author

Yes, I tried this solution.
It works for some SMTP servers (like mailhog which I use in a development environment) but not the one I've to use on another environment.

As NodeMailer accepts configuration without authentication parameters, it seems like a good idea to use this behavior in N8N.

@Joffcom
Copy link
Member

Joffcom commented Jan 18, 2023

Hey @xavier-calland,

As you have opened a PR for this one I am going to mark this issue as closed as it is more of a feature than a bug and we can chat on the PR.

I do plan on getting the PR reviewed soon as well so this should be something that we have support for soon. Let me know if you have any questions on this.

@Joffcom Joffcom closed this as completed Jan 18, 2023
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

3 participants