class method
self.new_message_id
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
self.new_message_id( fqdn = nil )
Provides a new email message ID. You can use this to generate unique email message id’s for your email so you can track them.
Optionally takes a fully qualified domain name (default to the current hostname returned by Socket.gethostname) that will be appended to the message ID.
For Example:
email.message_id = TMail.new_message_id #=> "<47bf66845380e_25a8fbb80332@baci.local.tmail>" email.to_s #=> "Message-Id: <47bf668b633f1_25a8fbb80475@baci.local.tmail>\n\n" email.message_id = TMail.new_message_id("lindsaar.net") #=> "<47bf668b633f1_25a8fbb80475@lindsaar.net.tmail>" email.to_s #=> "Message-Id: <47bf668b633f1_25a8fbb80475@lindsaar.net.tmail>\n\n"
Parameters
-
fqdnopt = nil
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/utils.rb, line 88
def TMail.new_message_id( fqdn = nil )
fqdn ||= ::Socket.gethostname
"<#{random_tag()}@#{fqdn}.tmail>"
end
Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/utils.rb line 88
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in TMail