How to enable default BCC E-Mail

Infos:

  • Used Zammad version: 6.2.0
  • Used Zammad installation type: docker-compose
  • Operating system: docker
  • Browser + version: Edge

Expected behavior:

Actual behavior:

rails r ‘Setting.set(‘system_bcc’, ‘xxx@xxx.de’)’
I, [2023-12-06T16:16:30.605501 #60] INFO – : ActionCable is using the redis instance at redis://zammad-redis:6379.
I, [2023-12-06T16:16:30.615284#60-5980] INFO – : Using memcached as Rails cache store.
I, [2023-12-06T16:16:30.615372#60-5980] INFO – : Using the Redis back end for Zammad’s web socket session store.
Please specify a valid ruby command or the path of a script to run.
Run ‘rails runner -h’ for help.

/usr/local/bundle/gems/railties-7.0.8/lib/rails/commands/runner/runner_command.rb:46: syntax error, unexpected instance variable, expecting `do’ or ‘{’ or ‘(’
…g.set(system_bcc, xxx@xxx.de)
… ^~~~~~
/usr/local/bundle/gems/railties-7.0.8/lib/rails/commands/runner/runner_command.rb:46: syntax error, unexpected ‘)’, expecting end-of-input
…t(system_bcc, xxx@xxx.de)
… ^

Steps to reproduce the behavior:

  • I have logged into the Rails Docker Container, I think I need to load an environment, but I don’t really know what I am doing.

You cannot use ' without escaping. You’re basically breaking the command.

If you want to do it this way, e.g. use:
rails r "Setting.set('system_bcc', 'xxx@xxx.de')"

1 Like

It does not seem to make any difference at all:

zammad@ed92ce18b028:~$ rails r “Setting.set(‘system_bcc’, ‘xxx@xxx.de’)”
I, [2023-12-07T08:14:22.187389 #114] INFO – : ActionCable is using the redis instance at redis://zammad-redis:6379.
I, [2023-12-07T08:14:22.223688#114-5980] INFO – : Using memcached as Rails cache store.
I, [2023-12-07T08:14:22.224098#114-5980] INFO – : Using the Redis back end for Zammad’s web socket session store.
/opt/zammad/app/models/setting.rb:39:in set': Can't find config setting 'system_bcc' (RuntimeError) from /usr/local/bundle/gems/railties-7.0.8/lib/rails/commands/runner/runner_command.rb:46:in
from /usr/local/bundle/gems/railties-7.0.8/lib/rails/commands/runner/runner_command.rb:46:in eval' from /usr/local/bundle/gems/railties-7.0.8/lib/rails/commands/runner/runner_command.rb:46:in perform’
from /usr/local/bundle/gems/thor-1.3.0/lib/thor/command.rb:28:in run' from /usr/local/bundle/gems/thor-1.3.0/lib/thor/invocation.rb:127:in invoke_command’
from /usr/local/bundle/gems/thor-1.3.0/lib/thor.rb:527:in dispatch' from /usr/local/bundle/gems/railties-7.0.8/lib/rails/command/base.rb:87:in perform’
from /usr/local/bundle/gems/railties-7.0.8/lib/rails/command.rb:48:in invoke' from /usr/local/bundle/gems/railties-7.0.8/lib/rails/commands.rb:18:in
from /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' from /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require’
from bin/rails:5:in `’

Open a rails console rails c and run a command or two like:

Setting.count
Ticket.count
User.count

Does that return anything apart from errors?

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