title: Redmine plugin to send email on certain status change
body: <p>My scenario an issue change status in "closed" and redmine must send an email to an email address</p>
  
  <p>My constraint:</p>
  
  <ol>
  <li>issue assignee could not change</li>
  <li>email must be configurable by user administration</li>
  <li>only one email for issue</li>
  </ol>
  
  <p>I'm currently using Redmine 2.4.3 final and because I'm not able to find a setting or existing plugin to get this done, I'm writting down a plugin, here my code:</p>
  
  <pre><code>require 'mailer'
  
  module IssueAssignToPlugin
    class Hooks &lt; Redmine::Hook::ViewListener
      def controller_issues_edit_before_save(context={})
          configuration = Setting.plugin_helloworldredmineplugin
          if  !configuration.nil? &amp;&amp; configuration['enabled'] &amp;&amp; !configuration['user_id'].blank? &amp;&amp; !configuration['status_id'].blank?
              issue = context[:issue]
              status = IssueStatus.find(configuration['status_id'])
              user = User.find(configuration['user_id'])
              if !user.nil? &amp;&amp; !issue.watched_by?(user)
                  if issue.status == status
                      #issue.add_watcher(user)
                      #journal = issue.journals.last
                      #journal = Journal.new(:journalized =&gt; issue, :user =&gt; user, :created_on =&gt; Time.now)
                      #journal.details &lt;&lt; JournalDetail.new(:property =&gt; 'relation', :prop_key =&gt; 'label_relates_to', :value =&gt; 2)
                      #Mailer.deliver_issue_edit(journal)
                      #mail(to: user.mail, cc: user.mail, bbc: user.mail)
                      #Mailer.deliver_mail(mail)
  #
  #Your code goes here!
  #
                  end
              end
          end
          return ''
      end
      alias_method :controller_issues_bulk_edit_before_save, :controller_issues_edit_before_save
      alias_method :controller_issues_new_before_save, :controller_issues_edit_before_save
    end
  end
  </code></pre>
  
  <p>As you can see I've tried many ways, but without luck.</p>
  
  <p>Could someone please help me? My problem is "just" send an Email having only user.mail and using Redmine "settings"</p>