Set Message-ID header in ActionMailer?

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 = “[email protected]
@message_id = “my-custom-message-id”
@headers = {‘Message-ID’ => message.smtp_message_identifier}
@sent_on =
@body[:msg] = message.body

any suggestions?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs