Mercurial > p > roundup > code
changeset 2205:d2d574224110 maint-0.6
allow SENDMAILDEBUG=stdout
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sat, 10 Apr 2004 22:10:48 +0000 |
| parents | 10bb5de34eec |
| children | fc1d10a74651 |
| files | roundup/mailgw.py |
| diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/mailgw.py Sat Apr 10 22:10:25 2004 +0000 +++ b/roundup/mailgw.py Sat Apr 10 22:10:48 2004 +0000 @@ -73,7 +73,7 @@ an exception, the original message is bounced back to the sender with the explanatory message given in the exception. -$Id: mailgw.py,v 1.126.2.3 2004-03-24 22:27:39 richard Exp $ +$Id: mailgw.py,v 1.126.2.4 2004-04-10 22:10:48 richard Exp $ """ import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri @@ -385,7 +385,9 @@ subject='Badly formed message from mail gateway') # now send the message - if SENDMAILDEBUG: + if SENDMAILDEBUG == 'stdout': + print m.getvalue() + elif SENDMAILDEBUG: open(SENDMAILDEBUG, 'a').write('From: %s\nTo: %s\n%s\n'%( self.instance.config.ADMIN_EMAIL, ', '.join(sendto), m.getvalue()))
