Index: app/models/mailer.rb =================================================================== --- app/models/mailer.rb (revision 1048) +++ app/models/mailer.rb (working copy) @@ -24,13 +24,17 @@ def issue_add(issue) recipients issue.recipients + from issue.author.mail if issue.author + headers 'X-redmine-project' => issue.project.identifier subject "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}" body :issue => issue, :issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue) end def issue_edit(journal) + from journal.user.mail if journal.user issue = journal.journalized + headers 'X-redmine-project' => issue.project.identifier recipients issue.recipients # Watchers in cc cc(issue.watcher_recipients - @recipients) @@ -41,6 +45,7 @@ end def document_added(document) + headers 'X-redmine-project' => document.project.identifier recipients document.project.recipients subject "[#{document.project.name}] #{l(:label_document_new)}: #{document.title}" body :document => document, @@ -48,6 +53,7 @@ end def attachments_added(attachments) + #from attachments.author.mail if attachments.author container = attachments.first.container added_to = '' added_to_url = '' @@ -61,12 +67,15 @@ end recipients container.project.recipients subject "[#{container.project.name}] #{l(:label_attachment_new)}" + headers 'X-redmine-project' => container.project.identifier body :attachments => attachments, :added_to => added_to, :added_to_url => added_to_url end def news_added(news) + from news.author.mail if news.author + headers 'X-redmine-project' => news.project.identifier recipients news.project.recipients subject "[#{news.project.name}] #{l(:label_news)}: #{news.title}" body :news => news, @@ -74,6 +83,8 @@ end def message_posted(message, recipients) + from message.author.mail if message.author + headers 'X-redmine-project' => message.board.project.identifier recipients(recipients) subject "[#{message.board.project.name} - #{message.board.name}] #{message.subject}" body :message => message, @@ -127,6 +138,7 @@ from Setting.mail_from default_url_options[:host] = Setting.host_name default_url_options[:protocol] = Setting.protocol + headers 'X-redmine-host' => Setting.host_name end # Overrides the create_mail method