bug13851.patch

xref bug #13851 - pasquale [:dedalus], 2013-04-26 08:41

Download (969 Bytes)

View differences:

app/models/mailer.rb Fri Apr 26 08:35:34 2013 +0200
452 452
  def self.message_id_for(object)
453 453
    # id + timestamp should reduce the odds of a collision
454 454
    # as far as we don't send multiple emails for the same object
455
    timestamp = object.send(object.respond_to?(:created_on) ? :created_on : :updated_on)
455
    
456
	timestamp = timestamp.localtime
457
	
456 458
    hash = "redmine.#{object.class.name.demodulize.underscore}-#{object.id}.#{timestamp.strftime("%Y%m%d%H%M%S")}"
457 459
    host = Setting.mail_from.to_s.gsub(%r{^.*@}, '')
458 460
    host = "#{::Socket.gethostname}.redmine" if host.empty?