instance method message_id=

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

message_id=( str )

Destructively sets the message ID of the mail object instance to the passed in string

Invalid message IDs are ignored (silently, unless configured otherwise) and result in a nil message ID. Left and right angle brackets are required.

Be warned however, that calling mail.ready_to_send will overwrite whatever value you have in this field with an automatically generated unique value.

If you really want to set your own message ID and know what you are doing per the various RFCs, you can do so with the enforced_message_id= command

Example:

mail = TMail::Mail.new
mail.message_id = "<348F04F142D69C21-291E56D292BC@xxxx.net>"
mail.message_id #=> "<348F04F142D69C21-291E56D292BC@xxxx.net>"
mail.message_id = "this_is_my_badly_formatted_message_id"
mail.message_id #=> nil

Parameters

str req
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb, line 611
    def message_id=( str )
      set_string_attr 'Message-Id', str
    end

Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb line 611 · View on GitHub · Improve this page · Find usages on GitHub

Defined in TMail::Mail

Type at least 2 characters to search.

↑↓ navigate · open · esc close