Open link in a new tab

Content

Expand project menu

Creating work package and e-mailing takes too long && and email_delivery_method as sendmail does not work?

Hi,

So we recently started using OpenProject 3.0 and all seems great ecxept…

When creating a issue it takes too long! If I disable e-mail delivery, it goes a lot quicker…

Also I tried using:

email_delivery_method: :sendmail
sendmail_location: "/usr/sbin/sendmail"
#  sendmail_location: "/usr/local/bin/debugargs"
  sendmail_arguments: "-a openproject@domain.com"

wich is quick, but sendmail is not recording anything to log… I tried ‘debugargs’ and got:

-a openproject@domain.com -f openproject@domain.com -- tiago.geada@domain.com

so it seems like the command is ran, but not sure about how to check if the e-mail body is pipped …

Also I installed delayed job.. and noticed it sending e-mails from updates on work packages.. also show on mail.info (from sendmail) .. but when a work package is created, no e-mail goes out!

here is production.log on creating work package (with sendmail method)

Started POST "/projects/sistemas/work_packages" for 85.242.52.7 at 2014-02-19 12:09:19 +0000
Processing by WorkPackagesController#create as HTML
  Parameters: {"utf8"=>"â", "authenticity_token"=>"wsF3/eE+NkbtZrlHT0O+1sJ+I/wNqeRZrtgCxixRl9c=", "work_package"=>{"type_id"=>"1", "subject"=>"test e-mail", "parent_id"=>"", "description"=>"test e-mail", "status_id"=>"1", "priority_id"=>"4", "assigned_to_id"=>"3", "responsible_id"=>"", "start_date"=>"", "due_date"=>"", "estimated_hours"=>"", "done_ratio"=>"0", "custom_field_values"=>{"3"=>"test e-mail"}}, "attachments"=>{"1"=>{"description"=>""}}, "send_notification"=>"1", "commit"=>"Create", "project_id"=>"sistemas"}
OpenProject User: Tiago Geada (tiago.geada ID: 3 <tiago.geada@domain.com>)
  Rendered user_mailer/_issue_details.html.erb (7.8ms)
  Rendered user_mailer/work_package_added.html.erb within layouts/user_mailer (11.8ms)
  Rendered user_mailer/_issue_details.text.erb (6.0ms)
  Rendered user_mailer/work_package_added.text.erb within layouts/user_mailer (9.8ms)

Sent mail to luciano.dias@domain.com (34.5ms)
  Rendered user_mailer/_issue_details.html.erb (7.3ms)
  Rendered user_mailer/work_package_added.html.erb within layouts/user_mailer (10.6ms)
  Rendered user_mailer/_issue_details.text.erb (5.1ms)
  Rendered user_mailer/work_package_added.text.erb within layouts/user_mailer (8.1ms)

Sent mail to tiago.geada@domain.com (24.8ms)
Redirected to https://openproject.domain.com/work_packages/470
Completed 302 Found in 313.5ms (ActiveRecord: 39.6ms)
Started GET "/work_packages/470" for 85.242.52.7 at 2014-02-19 12:09:19 +0000
Processing by WorkPackagesController#show as HTML
  Parameters: {"id"=>"470"}
OpenProject User: Tiago Geada (tiago.geada ID: 3 <tiago.geada@domain.com>)
  Rendered /var/lib/gems/2.0.0/bundler/gems/openproject-costs-2608c0ecbb78/app/views/hooks/costs/_view_work_package_show_action_menu.html.erb (2.4ms)
  Rendered work_packages/_action_menu.html.erb (16.5ms)
  Rendered layouts/_action_menu_base.html.erb (1.1ms)
  Rendered layouts/_action_menu_specific.html.erb (4.7ms)
  Rendered accessibility/_empty_element_tag.html.erb (0.7ms)
  Rendered work_packages/_subwork_packages_paragraph.html.erb (4.0ms)
  Rendered work_packages/_relation.html.erb (0.0ms)
  Rendered work_package_relations/_form.html.erb (3.2ms)
  Rendered work_packages/_relations.html.erb (14.7ms)
  Rendered watchers/_watchers.html.erb (79.5ms)
  Rendered layouts/_action_menu_base.html.erb (0.2ms)
  Rendered layouts/_action_menu_specific.html.erb (0.5ms)
  Rendered work_packages/_action_menu_with_edit_container.html.erb (1.4ms)
  Rendered work_packages/_sidebar.html.erb (0.1ms)
  Rendered work_packages/show.html.erb within layouts/base (220.6ms)
  Rendered search/_mini_form.html.erb (0.7ms)
  Rendered layouts/_action_menu.html.erb (0.0ms)
Completed 200 OK in 443.4ms (Views: 253.5ms | ActiveRecord: 11.9ms)

how should I proceed?

Message actions

Ow, I noticed now, that ‘debugargs’ was echoing from delayed_job, not from creating a workpackage …

Why is CREATE workpackage not sending e-mail?

Message actions

Hi Tiago,

everything in the log looks fine. Did you restarted your server after changing the email settings? And you should set the Emission email address in the admin area under ‘Settings / Email notification’ maybe the mail servers reject the mail because of wrong sender mail.

Best
Ratzi

Message actions

Hi,

sendmail executable simply does not get called… the emission email address is fine…

what should I look at? How to debug?

Message actions

Hi Tiago,

first you can check your mail setting in a rails console by run this from your rails root:

RAILS_ENV=production bundle exec rails c

Than type:

OpenProject::Configuration.email_delivery_method

This should promt:

=> :sendmail

How do you started the delayed job, as you said the emails on wp updated are working right?

Best
Ratzi

Message actions
require 'rails/all'... 0.330s
Bundler.require... 1.120s
Application.initialize!... [deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
/var/lib/gems/2.0.0/gems/svg-graph-1.0.5/lib/SVG/Graph/Graph.rb:3: warning: class variable access from toplevel
4.600s
Loading production environment (Rails 3.2.16)
irb(main):001:0> OpenProject::Configuration.email_delivery_method
=> :sendmail
Message actions

so, how can I debug why sendmail is not being called even tho the production.log shows Sent mail to …

Message actions

Is there a way to make ‘Create work package’ action, send e-mail the same way when updating? (via delayed_job) ??

Message actions

I have almost the same problem. I’ve installed everything from source and all is working except sending e-mails, but for me when I enter
OpenProject::Configuration.email_delivery_method
I’ve got:

=> nil

What is wrong? Installation was performed according to official instruction, except for e-mails I’m using sendmail not gmail.

my configuration.yml looks like this:

rails_force_ssl: false
session_store: :cache_store
disable_password_choice: false
production:
email_delivery_method: :sendmail
rails_cache_store: :memcache

This is all I’ve got in it