2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Redmineのユーザのメール通知を止める

Posted at

Redmineのパスワード強制変更について前回書きましたが、同様にバージョンアップの検証環境などで動作確認をしつつ、メールだけはユーザに飛ばしたくない、というケースなどに、この方法を使っています。

たとえば:

  • 検証環境のサーバの設定としては、メール通知を許可している。
  • 本番環境のデータをコピーして検証していて、アカウント/設定は本番同様。
  • Admin権限でチケットやプラグインの動作確認をしていて、更新テストもするが、そのままではメールが飛んでしまうので宜しくない。
  • テストしている自分だけにメールが飛んで欲しい。

もちろん、DBからの一括更新でも大丈夫です。

下記は、Adminアカウント以外の通知をOffにする場合です。

# rails console production
Loading production environment (Rails x.x.x)
>> @users = User.all
>> for user in @users
>>   if user.login != 'admin'
>>     user.mail_notification = 'none'
>>     user.save!
>>  end
>> end

ただし、本番環境では、このようにはできませんので、データの一括インポートや、Adminアカウントによる変更をメールさせたくない場合は、このプラグインが便利です。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?