[openstreetmap/openstreetmap-website] Blog post subscription notification emails lacks In-Reply-To header field (#2430)

mmd notifications at github.com
Sat Dec 7 22:22:40 UTC 2019


First idea for an implementation would be something along those lines:

```ruby
diff --git a/app/mailers/notifier.rb b/app/mailers/notifier.rb
index b12599981..98d4946d8 100644
--- a/app/mailers/notifier.rb
+++ b/app/mailers/notifier.rb
@@ -99,6 +99,8 @@ class Notifier < ApplicationMailer
 
       attach_user_avatar(comment.user)
 
+      headers['In-Reply-To'] = "osm-diary-#{comment.diary_entry.id}@#{Settings.server_url}"
+
       mail :from => from_address(comment.user.display_name, "c", comment.id, comment.digest, recipient.id),
            :to => recipient.email,
            :subject => I18n.t("notifier.diary_comment_notification.subject", :user => comment.user.display_name)
@@ -136,6 +138,8 @@ class Notifier < ApplicationMailer
       @author = @commenter
       attach_user_avatar(comment.author)
 
+      headers['In-Reply-To'] = "osm-note-#{comment.note.id}@#{Settings.server_url}"
+
       subject = if @owner
                   I18n.t("notifier.note_comment_notification.#{@event}.subject_own", :commenter => @commenter)
                 else
@@ -166,6 +170,8 @@ class Notifier < ApplicationMailer
 
       attach_user_avatar(comment.author)
 
+      headers['In-Reply-To'] = "osm-changeset-#{comment.changeset.id}@#{Settings.server_url}"
+
       mail :to => recipient.email, :subject => subject
     end
   end

```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2430#issuecomment-562891829
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20191207/2bcec73d/attachment.html>


More information about the rails-dev mailing list