Feature #29817
openMailHandler ignores "Default notification option" setting
0%
Description
Hi. We are using Redmine in our company and relying on its incoming email processing features.
In a case when created from inbound email (via rdm-mailhandler.rb), the new user account will be configured with "only_my_events" email notification setting which is hard-coded in MailHandler.new_user_from_attributes method as can be seen here https://github.com/redmine/redmine/blob/master/app/models/mail_handler.rb#L525
I am not sure if this is by design, should the default notification option be used instead, so such user account presets are consistent with accounts created via Redmine UI?
preconditions:- running Redmine server with email Webservice enabled
- a valid parseable email message;
- the user with the address in email FROM field should not exist
- a project with the name referenced in rdm-handler call should exist
- the default_notification_option setting should have any value except "only my events"
test case:
invoke rdm-handler.rb from the command line
./rdm-mailhandler.rb -u http://$HOST:$PORT -k $EMAIL_WS_API_KEY --unknown-user create --project $PROJECT_NAME < ./msg.txt
expected result:
the newly created user should have its mail_notification property equal to Setting.default_notification_option
observed result:
2.2.5 :007 > User.last.mail_notification User Load (1.2ms) SELECT "users".* FROM "users" WHERE "users"."type" IN ('User', 'AnonymousUser') ORDER BY "users"."id" DESC LIMIT 1 => "only_my_events" 2.2.5 :008 > Setting.default_notification_option => "all"
Thanks,
Eugene Dubinin
Related issues
Updated by Go MAEDA about 6 years ago
- Related to Feature #13341: Mail handler: --no-notification option to disable notifications to the created user added
Updated by Go MAEDA about 6 years ago
FYI: Jean-Philippe Lang wrote in #13341#note-2 as follows:
It can be usefull to disable email notifications when we don't want the user to receive any emails but being able to choose between all the options is not so usefull IMO. I've the set the default to "only_my_events" in r11590.
Updated by Marius BĂLTEANU about 6 years ago
Go MAEDA wrote:
FYI: Jean-Philippe Lang wrote in #13341#note-2 as follows:
It can be usefull to disable email notifications when we don't want the user to receive any emails but being able to choose between all the options is not so usefull IMO. I've the set the default to "only_my_events" in r11590.
I think we should change the current behaviour and use the default notification option.
Updated by Marius BĂLTEANU about 6 years ago
- Tracker changed from Defect to Feature