https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292010-02-24T16:03:46ZRedmineRedmine - Defect #4920: Email notifications on file upload sent to empty recipient listhttps://www.redmine.org/issues/4920?journal_id=146542010-02-24T16:03:46ZJon Pascoe
<ul></ul><p>As per the FAQ, I modified my config/environments/production.rb settings so that mailer activities would be logged. As you can see, this confirms the issue of no recipient addresses being used:<br /><pre>
Processing ProjectsController#add_file (for xxx.xxx.xxx.xxx at 2010-02-24 15:50:08) [POST]
Parameters: {"commit"=>"Add", "action"=>"add_file", "authenticity_token"=>"PhQkKzGZ2diEjdIdjsZHPootAQpWWElnx4LkI22/I=", "id"=>"projectid", "controller"=>"projects", "attachments"=>{"1"=>{"file"=>#<File:/tmp/RackMultipart20100224-84201-1ashycm-0>, "description"=>"test"}}}
Sent mail to
Redirected to http://*******.co.uk/projects/projectid/files
Completed in 508ms (DB: 3) | 302 Found [http://*******.co.uk/projects/projectid/files/new]
</pre></p> Redmine - Defect #4920: Email notifications on file upload sent to empty recipient listhttps://www.redmine.org/issues/4920?journal_id=146912010-02-25T22:49:23ZJon Pascoe
<ul></ul><p>Further to the details above ... My original installation of Redmine was on OSX. That copy is still installed, and still broken.</p>
<p>Since then I created a Fedora VM to test it out there, installed Redmine, and everything is working as expected.</p>
<p>Both installations are approximately identical, bar a few vendor packaging differences.<br />Both use Apache, Passenger, MySQL, and rails versions. Also, they're both configured with the same email account/server for sending mail.</p>
<p>There is one difference ... Fedora has Ruby 1.8.6, and OSX has Ruby 1.8.7.<br />I find it hard to believe that is the problem though.</p> Redmine - Defect #4920: Email notifications on file upload sent to empty recipient listhttps://www.redmine.org/issues/4920?journal_id=147752010-02-28T17:20:06ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>Emails without recipients should not be sent.<br />A test was added for that in <a class="changeset" title="Adds a test for not sending email without recipient (#4920)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/3518">r3518</a> and it passes with ruby 1.8.7.</p> Redmine - Defect #4920: Email notifications on file upload sent to empty recipient listhttps://www.redmine.org/issues/4920?journal_id=147762010-02-28T17:27:35ZJon Pascoe
<ul></ul><p>I have retested on OSX, with another user added to the project. Again, when a file is uploaded an email is generated with no recipients.<br />The problem isn't that an email isn't being sent, but that an email is being sent without recipients.</p>
<p>Identical tests on my Fedora installation work perfectly, only my OSX installation is affected.</p>
<p>I have re-installed my OSX redmine from scratch, to be sure I haven't messed up the install, and the problem still occurs.</p> Redmine - Defect #4920: Email notifications on file upload sent to empty recipient listhttps://www.redmine.org/issues/4920?journal_id=148222010-03-02T13:15:05ZAndrew Rudenko
<ul></ul><p>I just want to add some details:<br />if submit any changes to the issues, we can see in production.log the message like this: <pre>Sending email notification to: name1.surname1@email.domain.com, name2.surname2@email.domain.com, name3.surname3@email.domain.com</pre></p>
<p>but if we add a new document or upload a file, we can see another recipients list: <pre>Sending email notification to: Name1 Surname1, Name2 Surname2, Name3 Surname3</pre></p>
<p>and the notification is not received in the last case.<br />the logic for recipients has been updated in app/modules/mailer.rb for 9.2 version, and it seems not accurately well.</p> Redmine - Defect #4920: Email notifications on file upload sent to empty recipient listhttps://www.redmine.org/issues/4920?journal_id=148262010-03-02T14:19:25ZAndrew Rudenko
<ul></ul><p>I've changed app/models/mailer.rb a little and now all notifications are sent to their recipients<br /><pre><code>Index: app/models/mailer.rb
===================================================================
--- app/models/mailer.rb (revision 3521)
+++ app/models/mailer.rb (working copy)
@@ -114,11 +114,11 @@
when 'Project'
added_to_url = url_for(:controller => 'projects', :action => 'list_files', :id => container)
added_to = "#{l(:label_project)}: #{container}"
- recipients container.project.notified_users.select {|user| user.allowed_to?(:view_files, container.project)}
+ recipients container.project.notified_users.select {|user| user.allowed_to?(:view_files, container.project)}.collect {|m| m.mail}
when 'Version'
added_to_url = url_for(:controller => 'projects', :action => 'list_files', :id => container.project_id)
added_to = "#{l(:label_version)}: #{container.name}"
- recipients container.project.notified_users.select {|user| user.allowed_to?(:view_files, container.project)}
+ recipients container.project.notified_users.select {|user| user.allowed_to?(:view_files, container.project)}.collect {|m| m.mail}
when 'Document'
added_to_url = url_for(:controller => 'documents', :action => 'show', :id => container.id)
added_to = "#{l(:label_document)}: #{container.title}"
</code></pre></p> Redmine - Defect #4920: Email notifications on file upload sent to empty recipient listhttps://www.redmine.org/issues/4920?journal_id=148282010-03-02T14:39:27ZJon Pascoe
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li><li><strong>Assignee</strong> set to <i>Jean-Philippe Lang</i></li></ul><p>I've added those changes to my OSX installation and retested ... notifications for file uploads now work perfectly.</p> Redmine - Defect #4920: Email notifications on file upload sent to empty recipient listhttps://www.redmine.org/issues/4920?journal_id=148892010-03-03T22:11:13ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li><li><strong>Target version</strong> set to <i>0.9.4</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Fixed was committed in <a class="changeset" title="Fixed: no email notification on new project/version file added (#4966)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/3532">r3532</a>.</p> Redmine - Defect #4920: Email notifications on file upload sent to empty recipient listhttps://www.redmine.org/issues/4920?journal_id=148912010-03-03T22:20:32ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Subject</strong> changed from <i>Email notifications sent to empty recipient list</i> to <i>Email notifications on file upload sent to empty recipient list</i></li></ul>