gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: jakarta-gump/python/gump/net mailer.py
Date Wed, 04 Feb 2004 01:43:02 GMT
ajack       2004/02/03 17:43:02

  Modified:    python/gump/utils __init__.py
               python/gump/net mailer.py
  Log:
  Attempt to fix the 'Sent' attribute (actually Date:) in e-mail content.
  
  Looking at http://www.ietf.org/rfc/rfc0821.txt, it seems this
  format is correct.
  
  Revision  Changes    Path
  1.18      +4 -4      jakarta-gump/python/gump/utils/__init__.py
  
  Index: __init__.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/utils/__init__.py,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- __init__.py	28 Jan 2004 00:13:39 -0000	1.17
  +++ __init__.py	4 Feb 2004 01:43:02 -0000	1.18
  @@ -377,7 +377,7 @@
     print "secsToElapsedString(1340) : " + secsToElapsedString(1340)
     print "secsToTime(1340) : " + secsToTime(1340)
     print "elapsedTimeTripleToString(secsToElapsedTimeTriple(1340)) : " + elapsedTimeTripleToString(secsToElapsedTimeTriple(1340))
  -  
  +  print "Date (for SMTP) : " + time.strftime('%d %b %y %H:%M:%S')
     print "str = " + getStringFromUnicode("Ceki Gülcü")
     
     print "indent = [" + getIndent(5) + "]"
  
  
  
  1.5       +6 -5      jakarta-gump/python/gump/net/mailer.py
  
  Index: mailer.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/net/mailer.py,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mailer.py	1 Feb 2004 18:44:44 -0000	1.4
  +++ mailer.py	4 Feb 2004 01:43:02 -0000	1.5
  @@ -98,8 +98,9 @@
       def getSerialized(self):
           """E-mail"""
           # Add the From: and To: headers at the start!
  -        data = ("From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n%s%s"
  -           	% (	self.fromaddr, 
  +        data = ("Date: %s\r\nFrom: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n%s%s"
  +           	% (	time.strftime('%d %b %y %H:%M:%S'),
  +           	    self.fromaddr, 
              		string.join(self.toaddrs, ", "),
                   self.subject,
              		self.text,
  
  
  

Mime
View raw message