Create a Redmine plugin which sends out e-mail notifications to all assignees who have bugs that have not been updated in 7 days.

Ticket: #3352

This Redmine plugin sends out e-mail notifications.
It makes use of the Ruby on Rails ActionRecord class for querying
the Redmine database, and the Rub on Rails ActionMailer class
for sending the e-mail.

To create a new Redmine plugin, you must follow the steps
outlined at http://www.redmine.org/projects/redmine/wiki/Plugin_Tutorial

To create a new e-mail notification, you must do the
following.

  1.  Edit the app/models/email_notification.rb file.
      The EmailNotification class in this file inherits
      from the Redmine::Mailer class.
      The Redmine::Mailer class inherits from the
      ActionMailer::Base class.
      Each method in the ActionMailer::Base class
      corresponds to an e-mail notification that will be
      sent out.  To create a new e-mail notification,
      you must add a new method to the EmailNotification class.

  2.  Each method added in step 1. must have a view.
      If you added to the EmailNotification a method
      <b>"def mail1"</b>, then you must create two files:

      * app/views/mail1.html.erb
      * app/views/mail1.text.erb

      The filename of the view corresponds to the method
      name in the EmailNotification class.
      There must be two files, one for HTML and one for plain text.
      These files are in Embedded Ruby syntax.
      When the e-mail is generated, both files will be parsed,
      and a multipart MIME message containing both HTML and plain text will be
      sent.

  3.  Create a Rake task file in lib/tasks which invokes the method
      created in 1.

  4.  Optionally, create a cron job which invokes the Rake method
      created in 3.  For example, something like:

5 4 * * mon     cd /usr/local/www/redmine && rake email_notification:send_reminder days=7 RAILS_ENV=production

== References

  1.  ActiveRecord , http://api.rubyonrails.org/classes/ActiveRecord/Base.html

  2.  ActionMailer, http://api.rubyonrails.org/classes/ActionMailer/Base.html

  3.  Reminder code in Redmine:
        * http://svn.redmine.org/redmine/trunk/lib/tasks/reminder.rake
        * http://svn.redmine.org/redmine/trunk/app/models/mailer.rb

  4.  Redmine Update Reminder plugin by arkhitech:
       * https://github.com/arkhitech/redmine_update_reminder.git
Subtree merged in bugtracker