# SMTP Unable to Send Email

**URL:** <https://vaultwarden.discourse.group/t/smtp-unable-to-send-email/145>\
**Category:** Help\
**Created:** [June 11, 2020, 7:41pm UTC](https://vaultwarden.discourse.group/t/smtp-unable-to-send-email/145 "2020-06-11T19:41:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![wegiii](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/wegiii/32/115_2.png) [@wegiii](https://vaultwarden.discourse.group/u/wegiii)\
**Post date:** [June 11, 2020, 7:41pm UTC](https://vaultwarden.discourse.group/t/smtp-unable-to-send-email/145/1 "2020-06-11T19:41:23Z")

</div>

I am unable to send any email via SMTP. I have a working instance other than that, it seems that way so far anyway. I get this error from the admin panel and from the send validation email when you log into the vault. I have tried Google, M$ and my own SMTP information, which I have confirmed all working.

[2020-06-11 19:23:04][bitwarden\_rs::api::identity][ERROR] Error sending new device email: SmtpError.  
[CAUSE] Io(  
Os {  
code: 11,  
kind: WouldBlock,  
message: “Resource temporarily unavailable”,  
},  
)

I have no other warnings or errors in the logs. Any ideas or need any additional info from me?

[edit]  
docker-compose info:

> bitwarden:  
> container\_name: bitwarden  
> image: bitwardenrs/server:latest  
> restart: always  
> networks:  
> - $DEFAULT\_NETWORK  
> security\_opt:  
> - no-new-privileges:true  
> volumes:  
> - $USERDIR/docker/bitwarden:/data  
> - /var/log/docker:/var/log/docker  
> - /etc/timezone:/etc/timezone:ro  
> - /etc/localtime:/etc/localtime:ro  
> environment:  
> - SIGNUPS\_ALLOWED=true # Change to false after first login  
> - INVITATIONS\_ALLOWED=true # Send invitation using admin page  
> - WEBSOCKET\_ENABLED=true  
> - LOG\_FILE=/var/log/docker/bitwarden.log  
> - SMTP\_HOST=$SMTP\_SERVER  
> - SMTP\_FROM=$SMTP\_SERVER\_USER  
> - SMTP\_PORT=$SMTP\_SERVER\_PORT  
> - SMTP\_SSL=true  
> - SMTP\_USERNAME=$SMTP\_SERVER\_USER  
> - SMTP\_PASSWORD=$SMTP\_SERVER\_PASSWORD  
> - DOMAIN=[https://bw.$DOMAINNAME](https://bw.$DOMAINNAME)  
> #- DISABLE\_ADMIN\_TOKEN=true ### USE WITH CAUTION!! Access admin page at bw.$DOMAINNAME/admin to send invitations - anyone can access, add authorization!!!  
> labels:  
> - “traefik.enable=true”  
> ## HTTP Routers  
> - “traefik.http.routers.bitwarden-rtr.entrypoints=https”  
> - “traefik.http.routers.bitwarden-rtr.rule=Host(`bw.$DOMAINNAME`)”  
> - “traefik.http.routers.bitwarden-rtr.priority=10”  
> - “traefik.http.routers.bitwarden-rtr.tls=true”  
> ## Middlewares  
> - “traefik.http.routers.bitwarden-rtr.middlewares=chain-oauth@file” # Google OAuth 2.0  
> ## HTTP Services  
> - “traefik.http.routers.bitwarden-rtr.service=bitwarden-svc”  
> - “traefik.http.services.bitwarden-svc.loadbalancer.server.port=80”  
> ## Bitwarden WebSocket  
> - “traefik.http.routers.bitwardenHub-rtr.entrypoints=https”  
> - “traefik.http.routers.bitwardenHub-rtr.rule=(Host(`bw.$DOMAINNAME`) && Path(`/notifications/hub`))”  
> - “traefik.http.routers.bitwardenHub-rtr.priority=20”  
> - “traefik.http.routers.bitwardenHub-rtr.tls=true”  
> - “traefik.http.routers.bitwardenHub-rtr.service=bitwardenHub-svc”  
> - “traefik.http.services.bitwardenHub-svc.loadbalancer.server.port=3012”

[edit 2]  
My BW domain is different than my SMTP domain. I can’t see why this would bother anything…

---

<div class="post-metadata">

**Author:** ![BlackDex](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/blackdex/32/8_2.png) [@BlackDex](https://vaultwarden.discourse.group/u/BlackDex)\
**Post date:** [June 13, 2020, 12:27pm UTC](https://vaultwarden.discourse.group/t/smtp-unable-to-send-email/145/2 "2020-06-13T12:27:00Z")

</div>

It looks like the smtp server is not reachable with the parameters given.  
Please check if the host and port are correct.

---

<div class="post-metadata">

**Author:** ![wegiii](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/wegiii/32/115_2.png) [@wegiii](https://vaultwarden.discourse.group/u/wegiii)\
**Post date:** [June 16, 2020, 3:07pm UTC](https://vaultwarden.discourse.group/t/smtp-unable-to-send-email/145/4 "2020-06-16T15:07:14Z")

</div>

Thanks for the reply.

No matter what I place in the admin settings this is the error:

> [2020-06-16 15:01:57][error][ERROR] SmtpError.,  
> [CAUSE] Io(,  
> Os {,  
> code: 11,  
> kind: WouldBlock,  
> message: “Resource temporarily unavailable”,  
> },  
> ),  
> [2020-06-16 15:01:57][response][INFO] POST /admin/test/smtp (test\_smtp) =\> 400 Bad Request,

I have many other apps working from the same server, all using the same SMTP credentials. Any advice?

---

<div class="post-metadata">

**Author:** ![BlackDex](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/blackdex/32/8_2.png) [@BlackDex](https://vaultwarden.discourse.group/u/BlackDex)\
**Post date:** [June 16, 2020, 3:25pm UTC](https://vaultwarden.discourse.group/t/smtp-unable-to-send-email/145/5 "2020-06-16T15:25:15Z")

</div>

Is DNS working?  
You could check the diagnostics page in the /admin interface.

Also, try to increase the `smtp_timeout` from the default 15 to 30 or 60 even and see what happens then.

---

<div class="post-metadata">

**Author:** ![wegiii](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/wegiii/32/115_2.png) [@wegiii](https://vaultwarden.discourse.group/u/wegiii)\
**Post date:** [June 16, 2020, 3:50pm UTC](https://vaultwarden.discourse.group/t/smtp-unable-to-send-email/145/6 "2020-06-16T15:50:38Z")

</div>

Please see screenies below. Still failed at 60. I assume diag page is OK.

 ![bw-diag-page](https://global.discourse-cdn.com/free1/uploads/vaultwarden/original/1X/04c5f71ca1cfebfcc7d537cc3310cb4aad7b9ab4.png) ![bw-smtp-settings](https://global.discourse-cdn.com/free1/uploads/vaultwarden/original/1X/b0ad9128064853a2727b437db5d415e2770e83b3.png)

---

<div class="post-metadata">

**Author:** ![BlackDex](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/blackdex/32/8_2.png) [@BlackDex](https://vaultwarden.discourse.group/u/BlackDex)\
**Post date:** [June 16, 2020, 4:02pm UTC](https://vaultwarden.discourse.group/t/smtp-unable-to-send-email/145/7 "2020-06-16T16:02:58Z")

</div>

Just to be sure, you did do a save of the settings when you changed the timeout to 60 before you tried the test again right?

If so, was the error message still the same?

---

<div class="post-metadata">

**Author:** ![wegiii](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/wegiii/32/115_2.png) [@wegiii](https://vaultwarden.discourse.group/u/wegiii)\
**Post date:** [June 16, 2020, 4:18pm UTC](https://vaultwarden.discourse.group/t/smtp-unable-to-send-email/145/8 "2020-06-16T16:18:18Z")

</div>

😆 Upon your first reply, when I tested again this morning, I thought I was forgetting to click save each time, turns out I was indeed clicking save this time and the prior times.

Anyway, yes, the same error. It doesn’t seem to matter what I put in there, just the same error over and over with working / non-working SMTP credentials.

All I know for sure is, it is specific to this container. I was hoping there would be lots of other info on the forums/github but alas, it seems to be me. I just wish there was a better error message to go off of.

---

<div class="post-metadata">

**Author:** ![wegiii](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/wegiii/32/115_2.png) [@wegiii](https://vaultwarden.discourse.group/u/wegiii)\
**Post date:** [June 29, 2020, 7:43pm UTC](https://vaultwarden.discourse.group/t/smtp-unable-to-send-email/145/9 "2020-06-29T19:43:57Z")

</div>

Follow Up Here:

Outlook SMTP working  
GMAIL SMTP working  
Personal SMTP not working - I have no idea why not. It works on all my other apps.

Anyway, I’m just happy one of them is working. Maybe it was an update, maybe I am fried. WHO knows!

---

<div class="post-metadata">

**Author:** ![Matthieu](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Matthieu](https://vaultwarden.discourse.group/u/Matthieu)\
**Post date:** [July 7, 2020, 11:10pm UTC](https://vaultwarden.discourse.group/t/smtp-unable-to-send-email/145/10 "2020-07-07T23:10:45Z")

</div>

Have you checked if “Less secure Apps” is authorized in your Gmail / Google account ?  
Google Account / Security  
Less secure App -\> Autorize.

To be more secure:  
Activate 2FA autentication ingoogle account  
Then Create an App-specific Password.

---

<div class="post-metadata">

**Author:** ![wegiii](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/wegiii/32/115_2.png) [@wegiii](https://vaultwarden.discourse.group/u/wegiii)\
**Post date:** [July 8, 2020, 12:40pm UTC](https://vaultwarden.discourse.group/t/smtp-unable-to-send-email/145/11 "2020-07-08T12:40:18Z")

</div>

I used the less secure option for gmail. I wont be using their service but thanks for following up!
