Describe the problem/error/question
I have set up a new n8n container however I am trying to get SMTP to work. I have set the relevant environment variables, however I believe I have found what the issue is, I just don’t know how to work around it.
We use smtp-relay.gmail.com which is working through a trusted IP, it does not require authentication to work. However, if I set my environment variables as follows:
N8N_EMAIL_MODE=‘smtp’
N8N_SMTP_HOST=‘smtp-relay.gmail.com’
N8N_SMTP_PORT=25
N8N_SMTP_USER=‘’
N8N_SMTP_PASS=‘’
N8N_SMTP_SENDER=‘[email protected]’
N8N_SMTP_SSL=‘false’
When I try to run through the “forgot password” process, I get:
Please contact your admin. n8n isn’t set up to send email right now.
Now if I specify a username and password in the environment variables and I try again, it attempts to send an email but of course, it fails with “invalid username/password”.
I believe the issue here is that n8n won’t allow you to have a blank username/password in the environment variables and uses this as a check to determine if smtp should be used, rather than using N8N_EMAIL_MODE=‘smtp’
Is there a workaround to this or can n8n be updated to look at the N8N_EMAIL_NODE to determine if email is configured on the system which will allow it to not auth using a username and password to the SMTP server?
Thanks for any assistance.
Information on your n8n setup
- **n8n version:docker.n8n.io/n8nio/n8n
- Database (default: SQLite): SQLite
- **n8n EXECUTIONS_PROCESS setting (default: own, main):default
- **Running n8n via Docker