Test SMTP Email Settings

Hi, I have a Synology NAS, running VaultWarden as a docker container.

I went to the Admin portal, SMTP Eamil Settings section, I filled out:

  • Enabled: true
  • Host: smtp.gmail.com
  • Enable Secure SMTP: true
  • Force TLS: false
  • Port: 587
  • From Address: [my gmail email address]
  • From Name: my made up name
  • Username: [my gmail email address]
  • Password: a specific app password made just for this
  • SMTP Auth mechanism: [blank]

I saved it and when I test it, it says: Error sending SMTP test email, undefined.

I flipped over to the “Log” tab in the docker window, nothing shows there.

Thoughts/suggestions are greatly appreciated!

Try the setting I use for gmail

(When tested secure SMTP works both enabled and disabled) Enable Secure SMTP: false
Force TLS: True
Port: 465

Edit: corrected SMTP port

sorry, port 455 is not a standard port for SMTP delivery, I am sure the network admin won’t open it…

Anyway, I tried another account and it works now…

Thanks…

My apologies, I mistyped port 455 which should have been port 465, please see Send email from a printer, scanner, or app - Google Workspace Admin Help

I believe you can get it working with port 587 as well but may need both
Enable Secure SMTP: true
Force TLS: true

Try it, save the config, and test email outbound.

Also, wanted to check you have the proper firewall rule to allow outbound traffic on whatever outbound SMTP port you use. Either UPNP mostly in home use or the proper firewall rule to pass outbound traffic on the SMTP port to the internet, or Google’s SMTP servers.

Seems like the settings have changed a bit. I’m also having trouble getting the SMTP stuff setup right for gmail SMTP. Can anyone share their gmail SMTP setup? Thanks!

I use force_tls and port 465. I also tried starttls port 587 and that worked for me too.

Also my smtp auth mechanism is blank; not sure exactly what this does. I also added plain when I tried 587 starttls and it worked.

Wondering if this is due to something on your gmail account being used?

1 Like

that did the trick. thanks!

Does anyone have an opinion on which port is the preferred one to go with, given that the SMTP service uses both?

port 587.

1 Like

:+1: I’ve read the articles about it. It does seem 587 is the way forward. It was confusing for me because In some applications you would have to uncheck ssl when specifying port 587; thus nothing would be checked off. It creates an illusion that you have less security when unchecking a box such as ssl, as long as starttls is baked into port 587 with no additional check boxes needed then I guess it’s good. This is the part I haven’t been able to find or figure out in the articles.

I cant send Emails.

Error sending SMTP test email
SMTP 5xx error: permanent error (535): 5.7.8 Username and Password not accepted. Learn more at - Authentication credentials invalid

I can sign up on google.com

Now its worked, after change login metthod in 2FA in google and using app passwort

1 Like

What is the smtp auth mechanism field for, and what is a recommended value for it. I’ve been running the default blank value.

I believe this might help to explain

Ok so I see this field is to send username and password to the email server. If that is the case how is it authenticating when that field is left blank?

I believe this defaults to whatever your docker run command or docker-compose file dictates.
Otherwise I assume if left blank in the admin panel and not otherwise configured it would fall back to PLAIN

Trying to set up Gmail on Unraid docker container. I am getting this error.
error

SMTP config is:

2FA config is:


Gmail app password is in the pw field in the SMTP config.

Any thoughts?

I just did this dance and it is a gmail thing, extra security. Because we can’t do 2 factor for this you need to do this:

  1. Go to your Google Account.
  2. Select Security.
  3. Under “Signing in to Google,” select 2-Step Verification.
  4. At the bottom of the page, select App passwords.
  5. Enter a name that helps you remember where you’ll use the app password.
  6. Select Generate.
  7. To enter the app password, follow the instructions on your screen. The app password is the 16-character code that generates on your device.
  8. Select Done.

drop that password into vaultwarden and you are golden and good to go.