git://git.onelab.eu
/
monitor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9b62546
)
Except on MTA error and continue.
author
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Wed, 17 Jan 2007 16:03:30 +0000
(16:03 +0000)
committer
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Wed, 17 Jan 2007 16:03:30 +0000
(16:03 +0000)
mailer.py
patch
|
blob
|
history
diff --git
a/mailer.py
b/mailer.py
index
8df3b98
..
dc0799d
100755
(executable)
--- a/
mailer.py
+++ b/
mailer.py
@@
-4,7
+4,7
@@
#
# Faiyaz Ahmed <faiyaza@cs.princeton.edu>
#
#
# Faiyaz Ahmed <faiyaza@cs.princeton.edu>
#
-# $Id: $
+# $Id:
mailer.py,v 1.4 2006/11/14 19:20:13 faiyaza Exp
$
from emailTxt import *
import smtplib
import config
from emailTxt import *
import smtplib
import config
@@
-63,9
+63,12
@@
def email (subject, text, to):
msg = out.getvalue()
out.close()
if not config.debug:
msg = out.getvalue()
out.close()
if not config.debug:
- server = smtplib.SMTP(MTA)
- server.sendmail(FROM, to, msg)
- server.quit()
+ try:
+ server = smtplib.SMTP(MTA)
+ server.sendmail(FROM, to, msg)
+ server.quit()
+ except Exception, err:
+ print "Mailer error: %s" % err
if __name__=="__main__":
import smtplib
if __name__=="__main__":
import smtplib