# Rocket Chat is not sending any emails

**URL:** <https://forums.rocket.chat/t/rocket-chat-is-not-sending-any-emails/18452>\
**Category:** Community Support\
**Tags:** rocketchat-apps, docker\
**Created:** [November 13, 2023, 10:02pm UTC](https://forums.rocket.chat/t/rocket-chat-is-not-sending-any-emails/18452 "2023-11-13T22:02:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aeit](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/aeit/32/4986_2.png) [@Aeit](https://forums.rocket.chat/u/Aeit)\
**Post date:** [November 13, 2023, 10:02pm UTC](https://forums.rocket.chat/t/rocket-chat-is-not-sending-any-emails/18452/1 "2023-11-13T22:02:09Z")

</div>

### Description

### Server Setup Information

- Version of Rocket.Chat Server: 6.4.5
- Operating System: Ubuntu 23.04
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled
- NodeJS Version: 14.21.3 - x64
- MongoDB Version: 5.0.22
- Proxy: nginx/traefik/
- Firewalls involved:

### Any additional Information

Users dont recieve emails even when i have configured SMTP in admin panel. Test mail also dosnt work. They make accounts without need for confirmation.

I freshly hosted instance based on your guide deploy-with-docker-and-docker-compose  
And used sample yml + custom .env

Originally i tried to do it based on : [Self-hosting Rocket.Chat With Docker [Complete Guide]](https://linuxhandbook.com/rocket-chat-docker/)

And i have set up container for nginx reverse proxy but it wasnt working so i disabled it and and used treafik as you suggested in guide.

I dont know what might be the case - logs are not showing anything regarding mails.

i filled all necessary .env rules

Traefik config (if enabled)

# Traefik version/image tag

TRAEFIK\_RELEASE=2.9.8

# Domain for https (change ROOT\_URL & BIND\_IP accordingly)

DOMAIN=chat.domain .com

# Email for certificate notifications

LETSENCRYPT\_EMAIL=admin@domain .com  
LETSENCRYPT\_HOST=chat.domain .com

---

<div class="post-metadata">

**Author:** ![Aeit](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/aeit/32/4986_2.png) [@Aeit](https://forums.rocket.chat/u/Aeit)\
**Post date:** [November 13, 2023, 10:09pm UTC](https://forums.rocket.chat/t/rocket-chat-is-not-sending-any-emails/18452/2 "2023-11-13T22:09:42Z")

</div>

Log has multiple errors of all sorts. Even token is wrong when i filled it properly as in guide from cloud panel.

```auto
rocketchat-rocketchat-1 | {"level":50,"time":"2023-11-12T21:55:40.298Z","pid":1,"hostname":"d64d7d4e8462","name":"System","msg":"An error occured registering with token. 'Couldn't register with token. Please make sure token is valid or hasn't already been used'"}
rocketchat-rocketchat-1 | Error: Greeting never received
rocketchat-rocketchat-1 | at SMTPConnection._formatError (/app/bundle/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:784:19)
rocketchat-rocketchat-1 | at SMTPConnection._onError (/app/bundle/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:770:20)
rocketchat-rocketchat-1 | at Timeout.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:704:22)
rocketchat-rocketchat-1 | at listOnTimeout (internal/timers.js:557:17)
rocketchat-rocketchat-1 | at processTimers (internal/timers.js:500:7) {
rocketchat-rocketchat-1 | code: 'ETIMEDOUT',
rocketchat-rocketchat-1 | command: 'CONN'
rocketchat-rocketchat-1 | }
rocketchat-rocketchat-1 | {"level":40,"time":"2023-11-13T21:16:16.113Z","pid":1,"hostname":"d64d7d4e8462","name":"DeprecationWarning","section":"API","msg":"The parameter \"query\" in the endpoint \"/api/v1/custom-user-status.list\" is deprecated and will be removed on version 7.0.0"}
rocketchat-rocketchat-1 | {"level":40,"time":"2023-11-13T21:32:03.296Z","pid":1,"hostname":"d64d7d4e8462","name":"DeprecationWarning","section":"API","msg":"The parameter \"fields\" in the endpoint \"/api/v1/users.list\" is deprecated and will be removed on version 7.0.0"}
rocketchat-rocketchat-1 | Error: Greeting never received
rocketchat-rocketchat-1 | at SMTPConnection._formatError (/app/bundle/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:784:19)
rocketchat-rocketchat-1 | at SMTPConnection._onError (/app/bundle/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:770:20)
rocketchat-rocketchat-1 | at Timeout.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:704:22)
rocketchat-rocketchat-1 | at listOnTimeout (internal/timers.js:557:17)
rocketchat-rocketchat-1 | at processTimers (internal/timers.js:500:7) {
rocketchat-rocketchat-1 | code: 'ETIMEDOUT',
rocketchat-rocketchat-1 | command: 'CONN'
rocketchat-rocketchat-1 | }
rocketchat-rocketchat-1 | {"level":40,"time":"2023-11-13T21:16:16.113Z","pid":1,"hostname":"d64d7d4e8462","name":"DeprecationWarning","section":"API","msg":"The parameter \"query\" in the endpoint \"/api/v1/custom-user-status.list\" is deprecated and will be removed on version 7.0.0"}
rocketchat-rocketchat-1 | {"level":40,"time":"2023-11-13T21:32:03.296Z","pid":1,"hostname":"d64d7d4e8462","name":"DeprecationWarning","section":"API","msg":"The parameter \"fields\" in the endpoint \"/api/v1/users.list\" is deprecated and will be removed on version 7.0.0"}
rocketchat-rocketchat-1 | Error: You have not provided a mail URL. You can provide it by using the environment variable MAIL_URL or your settings. You can read more about it here: https://docs.meteor.com/api/email.html.
rocketchat-rocketchat-1 | at packages/email/email.js:310:11
rocketchat-rocketchat-1 | at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40

```

---

<div class="post-metadata">

**Author:** ![Aeit](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/aeit/32/4986_2.png) [@Aeit](https://forums.rocket.chat/u/Aeit)\
**Post date:** [November 14, 2023, 7:39am UTC](https://forums.rocket.chat/t/rocket-chat-is-not-sending-any-emails/18452/3 "2023-11-14T07:39:39Z")

</div>

Today including me, nobody can login because its asking for two factor auhentication.

Its also impossible to turn it off because it asks for code that cannot be send

 ![Screenshot 2023-11-14 193312](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/5/56442702bf0c95134872ad4903b28c99c8ea036e.png)

---

<div class="post-metadata">

**Author:** ![Aeit](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/aeit/32/4986_2.png) [@Aeit](https://forums.rocket.chat/u/Aeit)\
**Post date:** [November 14, 2023, 7:26pm UTC](https://forums.rocket.chat/t/rocket-chat-is-not-sending-any-emails/18452/4 "2023-11-14T19:26:05Z")

</div>

according to [Email verification not working when MAIL\_URL env variable is passed · Issue #3602 · RocketChat/Rocket.Chat · GitHub](https://github.com/RocketChat/Rocket.Chat/issues/3602)

I have added MAIL\_URL to .env  
`MAIL_URL=smtp://yourmailbox@yourdomain.com:yourpassword@smtp.yourmailserver.com:465/`

But nothing helps, no forgot password mails, nor auth links.

Logs shows now:

```auto
rocketchat-rocketchat-1 | Error: Greeting never received
rocketchat-rocketchat-1 | at SMTPConnection._formatError (/app/bundle/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:784:19)
rocketchat-rocketchat-1 | at SMTPConnection._onError (/app/bundle/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:770:20)
rocketchat-rocketchat-1 | at Timeout.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:704:22)
rocketchat-rocketchat-1 | at listOnTimeout (internal/timers.js:557:17)
rocketchat-rocketchat-1 | at processTimers (internal/timers.js:500:7) {
rocketchat-rocketchat-1 | code: 'ETIMEDOUT',
rocketchat-rocketchat-1 | command: 'CONN'
rocketchat-rocketchat-1 | }

```

my smpt host is on ovh, i run test on online tools

 ![Screenshot 2023-11-14 230733](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/8/8ec02d643227949f75cf228347b57c45c3a1a67c.png)

Is something wrong with OVH or meteor itself?

---

<div class="post-metadata">

**Author:** ![christopher.lewis](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@christopher.lewis](https://forums.rocket.chat/u/christopher.lewis)\
**Post date:** [November 15, 2023, 2:01pm UTC](https://forums.rocket.chat/t/rocket-chat-is-not-sending-any-emails/18452/5 "2023-11-15T14:01:50Z")

</div>

Did you put in a username and password in the test tool???

It needs authentication to login to the server as a valid user so it can send the e-mail

---

<div class="post-metadata">

**Author:** ![christopher.lewis](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@christopher.lewis](https://forums.rocket.chat/u/christopher.lewis)\
**Post date:** [November 15, 2023, 2:04pm UTC](https://forums.rocket.chat/t/rocket-chat-is-not-sending-any-emails/18452/6 "2023-11-15T14:04:02Z")

</div>

I assume you have put a bind e-mail user account in the values you’ve added to the .env and tested the username and password of that account is working and can send / receive e-mails. But I find it’s easier to use the Rocket Chat Admin web interface and goto settings and SMTP and set it from there.
