]> git.cworth.org Git - sup/commitdiff
to determine the recipient address of an email, i now check
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Fri, 5 Jan 2007 16:49:19 +0000 (16:49 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Fri, 5 Jan 2007 16:49:19 +0000 (16:49 +0000)
envelope-to, then x-original-to, then delivered-to. wonder if that's right?
seems to work better, at any rate.

git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@184 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/message.rb

index b4a2749e45fb881e1696e5629cc8140cf85c9c1d..eb1c57d493f681ddcd0aaf7ca0f8fd06d29cfd76 100644 (file)
@@ -129,7 +129,7 @@ class Message
         nil
       end
 
-    @recipient_email = header["delivered-to"]
+    @recipient_email = header["x-original-to"] || header["envelope-to"] || header["delivered-to"]
     @source_marked_read = header["status"] == "RO"
   end
   private :read_header