# Error sending verify\_email

**URL:** <https://vaultwarden.discourse.group/t/error-sending-verify-email/2229>\
**Category:** Help\
**Created:** [January 15, 2023, 4:43am UTC](https://vaultwarden.discourse.group/t/error-sending-verify-email/2229 "2023-01-15T04:43:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zung](https://avatars.discourse-cdn.com/v4/letter/z/4af34b/32.png) [@zung](https://vaultwarden.discourse.group/u/zung)\
**Post date:** [January 15, 2023, 4:43am UTC](https://vaultwarden.discourse.group/t/error-sending-verify-email/2229/1 "2023-01-15T04:43:28Z")

</div>

I just created a Vaultwarden + Caddy docker in WSL2 from Windows 11.

After initial log on and creating master password I clicked on the Send Email of Verify Email prompt. I have never received the email sent by Vaultwarden.

I have read and followed the instructions here [SMTP Configuration · dani-garcia/vaultwarden Wiki - https://github.com/](https://github.com/dani-garcia/vaultwarden/wiki/SMTP-Configuration).

extract of SMTP configuration from docke-compose.yml as below..

```
 SMTP_HOST: "smtp.gmail.com"

```

# SMTP\_FROM: “[private@gmail.com](mailto:private@gmail.com)”

```
  SMTP_PORT: "465" # 587 starttls
  SMTP_SECURITY: "forcetls" # starttls
  SMTP_USERNAME: "private@gmail.com"
  SMTP_PASSWORD: "hdhdhdhdhdhdhd"

```

The password was taken from Google Account App Password facility

Here are the errors from Vaultwarden log …

```auto
2023-01-14 23:27:16 [2023-01-15 04:27:16.489][response][INFO] (login) POST /identity/connect/token => 200 OK
2023-01-14 23:27:16 [2023-01-15 04:27:16.532][request][INFO] POST /api/accounts/verify-email
2023-01-14 23:27:16 [2023-01-15 04:27:16.543][vaultwarden::api::core::accounts][ERROR] Error sending verify_email email: Address.
2023-01-14 23:27:16 [CAUSE] InvalidUser
2023-01-14 23:27:16 [2023-01-15 04:27:16.543][response][INFO] (post_verify_email) POST /api/accounts/verify-email => 200 OK
2023-01-14 23:27:22 [2023-01-15 04:27:22.992][request][INFO] GET /api/plans/
2023-01-14 23:27:23 [2023-01-15 04:27:23.005][response][INFO] (get_plans) GET /api/plans => 200 OK
2023-01-14 23:27:26 [2023-01-15 04:27:26.645][request][INFO] GET /api/accounts/revision-date

```

Can anybody find errors with my configuration? What more information are needed for the investigation?

---

<div class="post-metadata">

**Author:** ![stefan0xC](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/stefan0xc/32/1765_2.png) [@stefan0xC](https://vaultwarden.discourse.group/u/stefan0xC)\
**Post date:** [January 15, 2023, 7:55am UTC](https://vaultwarden.discourse.group/t/error-sending-verify-email/2229/2 "2023-01-15T07:55:31Z")

</div>

The error message `InvalidUser` points to the local part of the mail address (either in the to: or from:) being wrong.

My guess would be that the quotation marks around the values of the `SMTP_FROM` environment variable are causing issues as they seem to be `“` and `”` and not just `"` and thus the value is set to `“zung25@gmail.com”` instead of `zung25@gmail.com`

You can check in the [/admin page](https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page) and verify if the SMTP configuration is correct.

---

<div class="post-metadata">

**Author:** ![zung](https://avatars.discourse-cdn.com/v4/letter/z/4af34b/32.png) [@zung](https://vaultwarden.discourse.group/u/zung)\
**Post date:** [January 15, 2023, 3:47pm UTC](https://vaultwarden.discourse.group/t/error-sending-verify-email/2229/3 "2023-01-15T15:47:51Z")

</div>

still same error with

```auto
      SMTP_HOST: "smtp.gmail.com"
      SMTP_FROM: private@gmail.com
      SMTP_PORT: "587" # 465 587 starttls
      SMTP_SECURITY: "starttls" #force_tls starttls
      SMTP_USERNAME: private@gmail.com
      SMTP_PASSWORD: "mysecretpasseord"
      SMTP_DEBUG: "true"
  ADMIN_TOKEN: "xhhdjdjdjdjdjjdjdjdjddjPSFi"

```

trying /admin saying “The admin panel is disabled, please configure the ‘ADMIN\_TOKEN’ variable to enable it”

Thanks

---

<div class="post-metadata">

**Author:** ![zung](https://avatars.discourse-cdn.com/v4/letter/z/4af34b/32.png) [@zung](https://vaultwarden.discourse.group/u/zung)\
**Post date:** [January 15, 2023, 10:15pm UTC](https://vaultwarden.discourse.group/t/error-sending-verify-email/2229/4 "2023-01-15T22:15:25Z")

</div>

I have resolved the issues. I think the restart from Docker Desktop did not pick up the updated docker-compose file. I used docker command to down and up the containers and it worked fine now.

---

<div class="post-metadata">

**Author:** ![cksapp](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@cksapp](https://vaultwarden.discourse.group/u/cksapp)\
**Post date:** [January 16, 2023, 12:56am UTC](https://vaultwarden.discourse.group/t/error-sending-verify-email/2229/5 "2023-01-16T00:56:19Z")

</div>

@zung

As an aside, I would _ **HIGHLY** _ recommend that you change your current Gmail SMTP app password as you appear to have posted it here (as well as your login credentials) unredacted in a public forum _(possibly also edit your posting here, but assume it’s already compromised)_.

**Delete** the current one you are using and then create another as discussed below.  
Even with 2FA on your Google account, this app password bypasses this for SMTP.

> **[Sign in with App Passwords - Google Account Help](https://support.google.com/accounts/answer/185833?hl=en)**
>
> Tip: App Passwords aren’t recommended and are unnecessary in most cases. To help keep your account secure, use "Sign in with Google" to connect apps to your Google Account. 
> An App Password is

While I don’t think _(hope)_ anyone here would use it nefariously, but this is again a public forum open to the internet and anyone can stumble upon this.  
Generally good opsec would advise not to have any of your credentials in the clear.

The same would go for your `ADMIN_TOKEN` while not sure if your host is publicly available again this is the credential for access to the Admin panel.  
So best to change this and keep it closely guarded as well.  
Best 😉

---

<div class="post-metadata">

**Author:** ![zung](https://avatars.discourse-cdn.com/v4/letter/z/4af34b/32.png) [@zung](https://vaultwarden.discourse.group/u/zung)\
**Post date:** [January 16, 2023, 4:24am UTC](https://vaultwarden.discourse.group/t/error-sending-verify-email/2229/6 "2023-01-16T04:24:26Z")

</div>

Thank you for the advice. I will change the credentials as soon as possible.
