Update of /cvsroot/spambayes/spambayes/Outlook2000
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17895/Outlook2000

Modified Files:
        msgstore.py 
Log Message:
I'm not sure that PR_DISPLAY_NAME_A is the right property to find
 the "From" name in.  At least, I don't have any messages with
 that property, and I get a lot of Exchange-only mail.  So if
 that property isn't found, use PR_SENDER_NAME_A if that can be found (which 
works
 for me).

This will help those that need additional clues with Exchange-only messages.

Index: msgstore.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/msgstore.py,v
retrieving revision 1.90
retrieving revision 1.91
diff -C2 -d -r1.90 -r1.91
*** msgstore.py 26 Nov 2004 03:11:43 -0000      1.90
--- msgstore.py 6 Dec 2004 00:11:31 -0000       1.91
***************
*** 986,990 ****
          # on an exchange server that do not have such headers of their own
          prop_ids = PR_SUBJECT_A, PR_DISPLAY_NAME_A, PR_DISPLAY_TO_A, \
!                    PR_DISPLAY_CC_A, PR_MESSAGE_DELIVERY_TIME
          hr, data = self.mapi_object.GetProps(prop_ids,0)
          subject = self._GetPotentiallyLargeStringProp(prop_ids[0], data[0])
--- 986,991 ----
          # on an exchange server that do not have such headers of their own
          prop_ids = PR_SUBJECT_A, PR_DISPLAY_NAME_A, PR_DISPLAY_TO_A, \
!                    PR_DISPLAY_CC_A, PR_MESSAGE_DELIVERY_TIME, \
!                    PR_SENDER_NAME_A
          hr, data = self.mapi_object.GetProps(prop_ids,0)
          subject = self._GetPotentiallyLargeStringProp(prop_ids[0], data[0])
***************
*** 993,1001 ****
          cc = self._GetPotentiallyLargeStringProp(prop_ids[3], data[3])
          delivery_time = data[4][1]
          headers = ["X-Exchange-Message: true"]
!         if subject: headers.append("Subject: "+subject)
!         if sender: headers.append("From: "+sender)
!         if to: headers.append("To: "+to)
!         if cc: headers.append("CC: "+cc)
          if delivery_time:
              from time import timezone
--- 994,1010 ----
          cc = self._GetPotentiallyLargeStringProp(prop_ids[3], data[3])
          delivery_time = data[4][1]
+         alt_sender = self._GetPotentiallyLargeStringProp(prop_ids[5],
+                                                          data[5])
          headers = ["X-Exchange-Message: true"]
!         if subject:
!             headers.append("Subject: "+subject)
!         if sender:
!             headers.append("From: "+sender)
!         elif alt_sender:
!             headers.append("From: "+alt_sender)
!         if to:
!             headers.append("To: "+to)
!         if cc:
!             headers.append("CC: "+cc)
          if delivery_time:
              from time import timezone

_______________________________________________
Spambayes-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/spambayes-checkins

Reply via email to