Redmine emails not working properly
Added by Ethin Probst 8 months ago
I've no idea what I'm doing wrong, but my email setup isn't functioning as it should. Sending test emails works fine, but actions like sending account information or email notifications doesn't. I've tried with both mailgun and smtp2go, and when I say that it doesn't work, I mean that the SMTP server is never contacted at all. I switched to using sidekick as the email queue per the docs, but maybe that's outdated/broken? Should I use the default? Did I screw up somewhere?
There also aren't any error messages in the logs or displayed on the page. The queue engine notes that the message was queued in sidekick but that's it. Nothing else is in the logs about it.
Replies (6)
RE: Redmine emails not working properly - Added by Ethin Probst 8 months ago
Okay, I solved the problem. I hadn't started Sidekiq, and it wasn't using the mailers queue. Got it working after digging deeper into it's docs. (I've never used sidekiq before so this was interesting.)
RE: Redmine emails not working properly - Added by Dennis Galander 6 months ago
Hi Ethan,
can you be a bit more specific how you solved the problem, please?
If I follow the documentation of the SideKiq configuration I don't pass the Sidekiq test run.
My redmine logs say:
RE: Redmine emails not working properly - Added by Dennis Galander 6 months ago
(sorry, hit "send" too early)
...
My redmine logs say:
[["user_id", 5], ["is_default", true], ["LIMIT", 1]] I, [2024-06-11T14:44:27.862041 #6938] INFO -- : [56d34c08-d9e1-4bd3-b2aa-ed06e28cc09a] [ActiveJob] Enqueued ActionMailer::MailDeliveryJob (Job ID: 5a59b37d-48aa-41e0-afe5-01f421535e3b) to Sidekiq(mailers) with arguments: "Mailer", "issue_edit", "deliver_now", {:args=>[#<GlobalID:0x00007facc9f422c0 @uri=#<URI::GID gid://redmine-app/User/5>>, #<GlobalID:0x00007facc9f41cf8 @uri=#<URI::GID gid://redmine-app/Journal/2068>>]}
But having Sidekiq running with RAILS_ENV=production bundle exec sidekiq
just shows
2024-06-11T12:41:42.758Z pid=7055 tid=2l7 INFO: Booted Rails 6.1.7.7 application in production environment 2024-06-11T12:41:42.762Z pid=7055 tid=2l7 INFO: Running in ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux-gnu] 2024-06-11T12:41:42.762Z pid=7055 tid=2l7 INFO: See LICENSE and the LGPL-3.0 for licensing details. 2024-06-11T12:41:42.762Z pid=7055 tid=2l7 INFO: Upgrade to Sidekiq Pro for more features and support: https://sidekiq.org 2024-06-11T12:41:42.763Z pid=7055 tid=2l7 INFO: Sidekiq 7.2.4 connecting to Redis with options {:size=>10, :pool_name=>"internal", :url=>nil} 2024-06-11T12:41:42.776Z pid=7055 tid=2l7 INFO: Sidekiq 7.2.4 connecting to Redis with options {:size=>5, :pool_name=>"default", :url=>nil}
and no emails will be sent.
So any help is appreciated to get the Sidekiq config running.
Thanks,
Dennis
RE: Redmine emails not working properly - Added by Donald Martin 5 months ago
Did you get a solution to this - I have the same messages as you posted above
Thanks
Donald
RE: Redmine emails not working properly - Added by Dennis Weewer 5 months ago
Dennis Galander and Donald Martin
To prevent another XKCD thread:
The solution is to start sidekiq with "-q default -q mailers" it seems they changed the default queue names with later versions(https://github.com/rails/rails/pull/40766). That's how I got mine working just now
RE: Redmine emails not working properly - Added by Donald Martin 5 months ago
Thanks Dennis Galander - that worked a treat