Can't use Channel::Driver::Sendmail

Dears,
i am experiencing a problem with the mail delivery

“Can’t use Channel::Driver::Sendmail: #<TypeError: no implicit conversion of nil into String>” "

This happend directly after upgrading from 2.3.x to 2.4.0.

ZAmmad Version: 2.4.0
OS: CentOS 7
Browser: Firefox and Chrome (but it does not really matter here)
Elasticsearch Version: elasticsearch-5.6.9-1.noarch
The attachement mapper plugin is installed:
#> /usr/share/elasticsearch/bin/elasticsearch-plugin list
ingest-attachment

I tried sendmail and SMTP method, in both cases the same outcome

Expected behavior:

Mails are being sent out

Actual behavior:

Mail not being sent with this error message

Can’t use Channel::Driver::Sendmail: #<TypeError: no implicit conversion of nil into String>"

Steps to reproduce the behavior:

In my case i can try to answer via mail to every given ticket

Hey,

does this happen on every ticket (for example on a new ticket to someone else) too?
This might be an issue with rails from what Google gave me so far…

Hi,

this happens on every ticket, and it started right after the upgrade, and it does not matter if ti is with or without attachements or whether the tickets were created before or after the upgrade.

By now i found this in the logs


ERROR – : ["/opt/zammad/app/models/channel/email_build.rb:157:in gsub!'", "/opt/zammad/app/models/channel/email_build.rb:157:inhtml_complete_check’", “/opt/zammad/app/models/channel/email_build.rb:56:in block in build'", "/opt/zammad/vendor/bundle/ruby/2.4.0/gems/mail-2.6.6/lib/mail/message.rb:133:ininstance_eval’”, “/opt/zammad/vendor/bundle/ruby/2.4.0/gems/mail-2.6.6/lib/mail/message.rb:133:in initialize'", "/opt/zammad/app/models/channel/email_build.rb:52:innew’”, “/opt/zammad/app/models/channel/email_build.rb:52:in build'", "/opt/zammad/app/models/channel/driver/smtp.rb:55:insend’”, “/opt/zammad/app/models/channel.rb:273:in deliver'", "/opt/zammad/app/models/observer/ticket/article/communicate_email/background_job.rb:57:inperform’”, “/opt/zammad/vendor/bundle/ruby/2.4.0/gems/delayed_job-4.1.3/lib/delayed/backend/base.rb:81:in block in invoke_job'", "/opt/zammad/vendor/bundle/ruby/2.4.0/gems/delayed_job-4.1.3/lib/delayed/lifecycle.rb:61:inblock in initialize’”, “/opt/zammad/vendor/bundle/ruby/2.4.0/gems/delayed_job-4.1.3/lib/delayed/lifecycle.rb:66:in execute'", "/opt/zammad/vendor/bundle/ruby/2.4.0/gems/delayed_job-4.1.3/lib/delayed/lifecycle.rb:40:inrun_callbacks’”, “/opt/zammad/vendor/bundle/ruby/2.4.0/gems/delayed_job-4.1.3/lib/delayed/backend/base.rb:78:in invoke_job'", "/opt/zammad/vendor/bundle/ruby/2.4.0/gems/delayed_job-4.1.3/lib/delayed/worker.rb:230:inblock (2 levels) in run’”, “/opt/zammad/vendor/ruby-2.4.2/lib/ruby/2.4.0/timeout.rb:93:in block in timeout'", "/opt/zammad/vendor/ruby-2.4.2/lib/ruby/2.4.0/timeout.rb:103:intimeout’”, “/opt/zammad/vendor/bundle/ruby/2.4.0/gems/delayed_job-4.1.3/lib/delayed/worker.rb:230:in block in run'", "/opt/zammad/vendor/ruby-2.4.2/lib/ruby/2.4.0/benchmark.rb:308:inrealtime’”, “/opt/zammad/vendor/bundle/ruby/2.4.0/gems/delayed_job-4.1.3/lib/delayed/worker.rb:229:in run'", "/opt/zammad/vendor/bundle/ruby/2.4.0/gems/delayed_job-4.1.3/lib/delayed/worker.rb:312:inblock in reserve_and_run_one_job’”, “/opt/zammad/vendor/bundle/ruby/2.4.0/gems/delayed_job-4.1.3/lib/delayed/lifecycle.rb:61:in block in initialize'", "/opt/zammad/vendor/bundle/ruby/2.4.0/gems/delayed_job-4.1.3/lib/delayed/lifecycle.rb:66:inexecute’”, “/opt/zammad/vendor/bundle/ruby/2.4.0/gems/delayed_job-4.1.3/lib/delayed/lifecycle.rb:40:in run_callbacks'", "/opt/zammad/vendor/bundle/ruby/2.4.0/gems/delayed_job-4.1.3/lib/delayed/worker.rb:312:inreserve_and_run_one_job’”, “/opt/zammad/vendor/bundle/ruby/2.4.0/gems/delayed_job-4.1.3/lib/delayed/worker.rb:213:in block in work_off'", "/opt/zammad/vendor/bundle/ruby/2.4.0/gems/delayed_job-4.1.3/lib/delayed/worker.rb:212:intimes’”, “/opt/zammad/vendor/bundle/ruby/2.4.0/gems/delayed_job-4.1.3/lib/delayed/worker.rb:212:in work_off'", "/opt/zammad/app/models/scheduler.rb:305:inblock (3 levels) in worker’”, “/opt/zammad/vendor/ruby-2.4.2/lib/ruby/2.4.0/benchmark.rb:308:in realtime'", "/opt/zammad/app/models/scheduler.rb:303:inblock (2 levels) in worker’”, “/opt/zammad/app/models/scheduler.rb:299:in loop'", "/opt/zammad/app/models/scheduler.rb:299:inblock in worker’”, “/opt/zammad/vendor/bundle/ruby/2.4.0/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context’”]


Cheers
Soeren

Dears,

after a yum downgrade to 2.3.0 mailing is ok again, there seems to be a bug in 2.4.0

Cheers
soeren

Thanks for the info, I upgraded inside the 2.4 branch today morning and am having no problems… could you check what exact version of 2.4 you installed? This might help the dev-guys to see if this is a general problem… :slight_smile:

I think this is not a general problem with version 2.4.
Our production system is running on 2.4 too and we see no problems with mailing.

Does anyone know how to solve this problem ? right now i am back to 2.3.0 anyways, but i would be willing to try again, and start debugging if i would know where

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

Update: For some reason I had the same yesterday. It went out that the setting html_email_css_font was empty.

I was able to fix if by set the default value via:

zammad run rails r 'Setting.set("html_email_css_font", "font-family:'Helvetica New', Helvetica, Arial, Geneva, sans-serif; font-size: 12px;")'

Greetings,

-Martin

1 Like