Defect #13888 » bug13851.patch
| app/models/mailer.rb Tue Apr 23 04:10:30 2013 +0000 → app/models/mailer.rb Fri Apr 26 08:35:34 2013 +0200 | ||
|---|---|---|
|
def self.message_id_for(object)
|
||
|
# id + timestamp should reduce the odds of a collision
|
||
|
# as far as we don't send multiple emails for the same object
|
||
|
timestamp = object.send(object.respond_to?(:created_on) ? :created_on : :updated_on)
|
||
|
|
||
|
timestamp = timestamp.localtime
|
||
|
|
||
|
hash = "redmine.#{object.class.name.demodulize.underscore}-#{object.id}.#{timestamp.strftime("%Y%m%d%H%M%S")}"
|
||
|
host = Setting.mail_from.to_s.gsub(%r{^.*@}, '')
|
||
|
host = "#{::Socket.gethostname}.redmine" if host.empty?
|
||