Defect #18653
closedNotifications not sent with async_smtp
0%
Description
After switching from smtp to asynch_smtp notification does not work at all.
If I use "Send a test email" I get the following error message:
An error occurred while sending mail (undefined method `new' for "async_smtp":String)
If I edit an issue with watchers, no mails are delivered. In the production.log there is an entry:
NoMethodError (undefined method `new' for "async_smtp":String): app/models/mailer.rb:410:in `mail' app/models/mailer.rb:42:in `issue_add' app/models/mailer.rb:423:in `initialize' app/models/mailer.rb:446:in `method_missing' app/models/mailer.rb:52:in `block in deliver_issue_add' app/models/issue.rb:831:in `each_notification' app/models/mailer.rb:51:in `deliver_issue_add' app/models/issue.rb:1528:in `send_notification' app/models/issue.rb:165:in `create_or_update' app/controllers/issues_controller.rb:150:in `create'
Does anyone using async_smpt out there without problems?
Yesterday I fought with async_smtp problems and database authentification, see #18647 - this I could fix, but I am wondering, if I am the only one.
My configuration:
default: delivery_method: :async_smtp async_smtp_settings: address: "smtp.my-server.com" port: 25
My system:
Environment: Redmine version 2.5.3.stable Ruby version 2.0.0-p576 (2014-09-19) [x86_64-linux] Rails version 3.2.19 Environment production Database adapter Mysql2
Updated by Alexander Meindl almost 10 years ago
btw: same behavior with vanilla redmine (without any plugin).
Updated by Alexander Meindl almost 10 years ago
- Status changed from New to Resolved
After spending some time with testing I found the solution.
I used only a default block in configuration.yml. This works without problems if you don't use async_smtp. After adding a configuration block explicitly for production it works with async_smtp, too.
So, my solution for this problem was, changing
default: delivery_method: :async_smtp async_smtp_settings: address: "smtp.my-server.com" port: 25
to
production: delivery_method: :async_smtp async_smtp_settings: address: "smtp.my-server.com" port: 25
Updated by Toshi MARUYAMA almost 10 years ago
- Status changed from Resolved to Closed