Content
Email Notifications
Added by Dan W over 3 years ago
Hi all, I have installed openproject on my linux server using docker compose, following the instructions on https://docs.openproject.org/development/development-environment-docker/ and all the containers and running and working. However, I am having trouble with outbound emails. I have set up the email SMTP settings in the openproject web portal and it connects fine and when I sent a test email, it works. However, when I subsequently send email invitations nothing is sent, even though the interface reports back that the email was sent successfully. I have googled the issue and it seems a lot of people have experienced the same problem, however none of the answers I have found seemed to rectify this issue. Please could I get some help with this as I am not sure if there is something I'm missing.
Replies (2)
Hi Dan,
let me try to help you here:
There are two different types of emails in OpenProject: One sent directly within the request to the server (this includes the test mail) and one sent asynchronously, via a background job from the backend. The majority of mail sending jobs is run asynchronously to facilitate a faster response time for server request.
Use a browser to call your domain name followed by "health_checks/all" (e.g. https://myopenproject.com/health_checks/all). There should be entries about "delayed_jobs_backed_up" and "delayed_jobs_never_ran". If PASSED is written behind it, everything is good.
If the health check does not return satisfying results, have a look if the background worker is running by entering
ps aux | grep jobs
on the server. If it is not running, no entry is returned. If it is running an entry with "jobs:work" at the end is displayed.If the worker is not running please try a restart with
sudo openproject restart worker
.If that doesn't help it could be that the worker is scaled to 0 for some reason, so please try
sudo openproject scale worker=1
.If that doesn't help either, please have a look at your [logs](../operation/monitoring), which are accessible with
sudo openproject logs
.Another approach would be to restart OpenProject completely, especially after changing the configuration of your SMTP server:
sudo openproject restart
.Kind regards
Matthias
I have the same problem.
full
database: PASSED Schema version: 20240307190126 (0.004s)
default: PASSED Application is running (0.000s)
delayed_jobs_backed_up: PASSED Delayed Jobs with priority lower than '0' at reasonable level (0) (0.002s) (OPTIONAL)
delayed_jobs_never_ran: PASSED All previous jobs have completed within the past 5 minutes. (0.001s)
mail: FAILED ActionMailer::Base at localhost:25 is not accepting connections: 'localhost is not accepting connections on port 25: Connection refused - connect(2) for "localhost" port 25' (0.000s)
puma: PASSED Backlog ok (0.000s) (OPTIONAL)
We not use the port 25.
With command
ps aux | grep jobs
I get "jobs:work".With command
sudo openproject scale worker=1
I get "nothing to do".Form the logs with
sudo openproject logs
I don't understand nothing.