Skip to content

DragonFlyBSD/redmine-tracker-mail-cc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Redmine Tracker Mail CC

A Redmine plugin that adds per-tracker CC email addresses for issue notifications. When an issue is created or updated, the configured CC addresses for that tracker receive exactly one notification email, in addition to the normal per-user notifications that Redmine sends.

This is useful for routing issue notifications to shared mailboxes, mailing lists, ticketing systems, or any external address that should be kept in the loop for a specific tracker.

Features

  • Adds a "CC Mail Address" field to each tracker's configuration
  • Supports multiple addresses separated by commas or semicolons
  • Sends one email per notification event to the CC addresses (no duplicates)
  • Works for both new issue (issue_add) and issue update (issue_edit) notifications
  • CC delivery runs as a background job (non-blocking)
  • Does not interfere with Redmine's normal per-user email delivery

Requirements

  • Redmine 6.0.0 or higher
  • Ruby 3.1 or higher

Installation

  1. Copy or clone this plugin into your Redmine plugins/ directory:

    cd /path/to/redmine
    git clone <repository-url> plugins/redmine_tracker_mail_cc

    Or copy the directory manually so it ends up at plugins/redmine_tracker_mail_cc/.

  2. Install dependencies:

    bundle install
  3. Run the plugin database migration:

    bundle exec rake redmine:plugins:migrate NAME=redmine_tracker_mail_cc RAILS_ENV=production
  4. Restart Redmine.

  5. Verify the plugin is installed by going to Administration > Plugins. You should see "Tracker Mail CC" listed with version 0.2.0.

Usage

  1. Go to Administration > Trackers.
  2. Create a new tracker or edit an existing one.
  3. Enter one or more email addresses in the CC Mail Address field, separated by commas or semicolons.
  4. Save the tracker.

From that point on, any issue notification for that tracker will send a single copy to the configured CC addresses.

Examples

CC Mail Address field Result
support@example.com One address receives notifications
a@example.com, b@example.com Both addresses receive one notification each
a@example.com; b@example.com Same as above (semicolons also work)
(empty) No CC emails are sent (default behavior)

Uninstallation

  1. Roll back the plugin's database migration:

    bundle exec rake redmine:plugins:migrate NAME=redmine_tracker_mail_cc VERSION=0 RAILS_ENV=production

    This removes the mail_cc column from the trackers table.

  2. Remove the plugin directory:

    rm -rf plugins/redmine_tracker_mail_cc
  3. Restart Redmine.

How it works

The plugin has three main components:

  • TrackerPatch -- adds the mail_cc attribute to the Tracker model as a safe attribute so it can be edited via the admin UI.
  • MailerClassPatch -- prepends onto Mailer's singleton class to override the deliver_issue_add and deliver_issue_edit class methods. After calling super (which handles normal per-user delivery), it enqueues a background job to send one email to the tracker's CC addresses.
  • TrackerCcDeliveryJob -- an Active Job that builds the notification email using Redmine's standard mailer methods, replaces the recipient with the CC addresses, and delivers it.

A Deface override adds the "CC Mail Address" text field to the tracker edit form (trackers/_form).

File structure

redmine_tracker_mail_cc/
  app/
    jobs/
      tracker_cc_delivery_job.rb   # Background job for CC delivery
  config/
    locales/
      en.yml                       # English locale (field label)
  db/
    migrate/
      001_add_mail_cc_to_trackers.rb  # Adds mail_cc column to trackers
  lib/
    redmine_tracker_mail_cc.rb     # TrackerPatch, MailerClassPatch, Deface override
  init.rb                          # Plugin registration and patching
  Gemfile                          # Plugin gem dependencies (deface)
  README.md

Development (Docker)

docker compose up --build

Notes

  • The CC email is delivered as a background job on the :mailers queue, the same queue used by Redmine's built-in deliver_later calls.
  • If the tracker's CC field is empty, no extra work is done -- the plugin is effectively a no-op for that tracker.
  • The plugin depends on the deface gem for injecting the form field. If deface is not available, the form field will not appear but the rest of the plugin still functions (you would need to set mail_cc via the Rails console or API).
  • Make sure Settings > Email notifications > Emission email address is configured for SMTP delivery to work.

License

This plugin is open source. See the LICENSE file for details.

About

Allows multiple trackers in Redmine

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages