Skip to content

Commit eb2990d

Browse files
author
Richard Jones
committed
allow SENDMAILDEBUG=stdout
1 parent 437368d commit eb2990d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

roundup/mailgw.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class node. Any parts of other types are each stored in separate files
7373
an exception, the original message is bounced back to the sender with the
7474
explanatory message given in the exception.
7575
76-
$Id: mailgw.py,v 1.126.2.3 2004-03-24 22:27:39 richard Exp $
76+
$Id: mailgw.py,v 1.126.2.4 2004-04-10 22:10:48 richard Exp $
7777
"""
7878

7979
import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
@@ -385,7 +385,9 @@ def handle_Message(self, message):
385385
subject='Badly formed message from mail gateway')
386386

387387
# now send the message
388-
if SENDMAILDEBUG:
388+
if SENDMAILDEBUG == 'stdout':
389+
print m.getvalue()
390+
elif SENDMAILDEBUG:
389391
open(SENDMAILDEBUG, 'a').write('From: %s\nTo: %s\n%s\n'%(
390392
self.instance.config.ADMIN_EMAIL, ', '.join(sendto),
391393
m.getvalue()))

0 commit comments

Comments
 (0)