Forum: Ruby on Rails set Message-ID header in ActionMailer?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Jeff E. (Guest)
on 2008-11-03 06:31
(Received via mailing list)
I'm trying to set my own Message-ID when sending mail... not having
any luck.  It seems that my ID header is overwritten.  i've tried both
message_id and headers below, nothing seems to work:

def setup_email(message, person)
  @recipients  = "#{}"
  @from        = "removed_email_address@domain.invalid"
  @message_id  = "my-custom-message-id"
  @headers     = {'Message-ID' => message.smtp_message_identifier}
  @sent_on     =
  @body[:msg]  = message.body

any suggestions?
This topic is locked and can not be replied to.