Set the Message-ID mail header in Rails3 / ActionMailer
问题 I would like to alter the Message-ID header that is in the header portion of an email sent from a Ruby on Rails v3 application using ActionMailer. I am using Sendmail on localhost for mail delivery. Do I configure this in Sendmail or ActionMailer? Where do I configure this (if it is ActionMailer): a file in config/ folder or a file in app/mailers/ folder? 回答1: Teddy's answer is good, except that if you actually want each message to have a different ID, you need to make the default a lambda.