SMTP setup issue

Thanks Jon,

The n8n stanza of my docker compose looks like this

 n8n:
    image: n8nio/n8n
    restart: always
    ports:
      - 5678:5678
    environment:
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER=${N8N_BASIC_AUTH_USER}
      - N8N_BASIC_AUTH_PASSWORD=${N8N_BASIC_AUTH_PASSWORD}
      - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
      - N8N_EMAIL_MODE=${N8N_EMAIL_MODE}
      - N8N_SMTP_HOST=${N8N_SMTP_HOST}
      - N8N_SMTP_PORT=${N8N_SMTP_PORT}
      - N8N_SMTP_USER=${N8N_SMTP_USER}
      - N8N_SMPT_PASS=${N8N_SMTP_PASS}
      - N8N_SMTP_SENDER=${N8N_SMTP_SENDER}
      - N8N_SMTP_SSL=false
    volumes:
      - ${DATA_FOLDER}/.n8n:/home/node/.n8n
      - ${DATA_FOLDER}/local_files:/files

Double checking the environment variables, they all exist inside the droplet (and inside the container):

root@ubuntu:~# echo $SUBDOMAIN
dREDACTEDa
root@ubuntu:~# echo $DOMAIN_NAME
tREDACTEDy
root@ubuntu:~# echo $N8N_EMAIL_MODE
smtp
root@ubuntu:~# echo $N8N_SMTP_HOST
smtp-relay.gmail.com
root@ubuntu:~# echo $N8N_SMTP_USER
nREDACTEDy
root@ubuntu:~# echo $N8N_SMTP_PASS
*REDACTEDy
root@ubuntu:~# echo $N8N_SMTP_SENDER
nREDACTEDy

I am not using any custom email templates (at the moment) does that matter? Do I still need to create a (empty) directory shared into the container for n8n to think that email is set up correctly?

Hey @phpguru,

For some reason this didn’t appear in my notifications, those settings look ok the only thing I can think of is maybe it can’t connect to the smtp relay address.

If you set the server to use the gmail smtp server does that work?

Nope its still non functional. I’ve tried literally dozens of various configs, restarting, etc., plus the issues I’m having on my other thread with random errors trying to reset it and start from scratch, I’m at a loss and have never had this much trouble setting up anything, ever.

Hey @phpguru,

That is very strange, When I used the gmail smtp server a while back it worked with no issues. What port are you using and what do you have the SSL option set to?