mailfactory 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/mailfactory.rb +5 -1
  2. metadata +2 -2
data/lib/mailfactory.rb CHANGED
@@ -182,10 +182,14 @@ class MailFactory
182
182
 
183
183
  # returns a formatted email
184
184
  def to_s()
185
+ # all emails get a unique message-id
186
+ remove_header("Message-ID")
187
+ add_header("Message-ID", "<#{Time.now.to_f()}.#{Process.euid()}.#{String.new.object_id()}>")
188
+
185
189
  if(get_header("Date").length == 0)
186
190
  add_header("Date", Time.now.strftime("%a, %d %B %Y %H:%M:%S %Z"))
187
191
  end
188
-
192
+
189
193
  # Add a mime header if we don't already have one and we have multiple parts
190
194
  if(multipart?())
191
195
  if(get_header("MIME-Version").length == 0)
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.10
3
3
  specification_version: 1
4
4
  name: mailfactory
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.2
7
- date: 2005-06-16
6
+ version: 0.5.3
7
+ date: 2005-06-20
8
8
  summary: MailFactory is a pure-ruby MIME mail generator
9
9
  require_paths:
10
10
  - lib