It isn't uncommon that you can't send emails despite the fact that you have configured your account name and password correctly in
.env. This is because of increasingly stringent security measurements Gmail and other email providers put in place to fight spam emails.
Typically for email accounts with 2FA (2 Factor Authentication) you will have to create an App password for devices that do not support 2FA, this will be necessary to do for Obico to successfully send emails. You could disable 2FA but this is not recommended for an account that is important to you, so if you really don't want to create an App password (it's quick) another option is to create an account used solely for email relay and to leave 2FA turned off for said account.
Step-by-step email server configuration and trouble-shooting guide
obico-server/.envin your preferred editor of choice.
Change the lines to the correct values of your email provider.
NOTE: If using an Outlook account the:
DEFAULT_FROM_EMAIL: needs to be set to match your:
For Outlook there are a few different SMTP settings, you can verify which are needed for your email under your: Account -> Settings -> Sync.
EMAIL_HOST=smtp.gmail.com # -> such as smtp.gmail.com
EMAIL_HOST_USERemail@example.com # -> such as your email address for a Gmail account
EMAIL_HOST_PASSWORD="fakepassword # -> your email account password, or your app password
EMAIL_PORT=587 # Check with your email provider to make sure. DO NOT surround it with quotes. Otherwise email won't be sent!
EMAIL_USE_TLS=True # -> Still set to True even for Outlook with STARTTLS
DEFAULT_FROM_EMAILfirstname.lastname@example.org # -> For Outlook set this to match EMAIL_HOST_USER: field, otherwise it is recommended not to change (Seems to work for Gmail without issue)
You can follow this guide if you want to use a Gmail account to send emails.
Without using 2FA you can just use your normal login credentials.
With 2FA enabled, you can create an App password under: My Microsoft Account -> Security -> Security Dashboard -> Advanced Security Options -> App Passwords.
Test if your email server configuration works
Open Django admin page at
Click the "Users" link.
Select the user to whom you want to send test email.
In the "Action" drop down list, select "Send test email". Click "Go".
Troubleshooting with the test email
Ensure you are correctly re-building your Docker container with the command
docker compose up --build -d (use sudo in front for Linux) when making changes during troubleshooting to the
docker-compose.yml file otherwise your changes may not take effect!
If you get a Server Error (500) it is likely that something is wrong with the configuration such as incorrect credentials, port, etc. Check the logs on your web container to see what may have been rejected.
If you get a message that your email has been successfully sent but no email arrives, make sure that you have verified the account email in the Obico App under Preferences -> Profile.
If it is still not working then please read through everything one more time, and if you still can't figure it out it's probably time to stop by the Discord channel for some help. Ask yourself these questions ahead of time to help explain the issue, has this account been used successfully before by another service to send e-mail through? Was it previously working with Obico and now it is not? What hardware are you hosting Obico Server on? Any other functions of Obico Server not working?