[英]Any easy ways to group the emails together into a thread using Rails ActionMailer?
無需跟蹤數據庫中的Message-ID。
您唯一需要的是為相同輸入生成相同Message-ID的方法(例如md5 hash
)。 該方法的輸入必須保持不變,並標識所有應分組在一起的消息。 在您的示例中,來自GitHub的有關特定拉取請求的分組電子郵件,他們本可以使用id作為輸入。
我將開始玩這樣的游戲:
require 'digets'
def message_id(identifer)
Digest::MD5.hexdigest(identifer)
end
message_id("pull-123")
#=> "23172d2caceae88a1152e967af71fc6e"
message_id("issue-456")
#=> "26c89ed68512269d003d32811bbd4527"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.