Permalink
Browse files

Made email subject optional

  • Loading branch information...
1 parent 9b5e58e commit 94dd3069a1efbde5585f1b11ac2315535f91b876 Roger Hoover committed Jun 30, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 superlance/process_state_email_monitor.py
@@ -63,7 +63,7 @@ def __init__(self, **kwargs):
self.fromEmail = kwargs['fromEmail']
self.toEmail = kwargs['toEmail']
- self.subject = kwargs.get('subject', 'Alert from supervisord')
+ self.subject = kwargs.get('subject')
self.smtpHost = kwargs.get('smtpHost', 'localhost')
self.digestLen = 76
@@ -92,7 +92,8 @@ def getBatchEmail(self):
def sendEmail(self, email):
msg = MIMEText(email['body'])
- msg['Subject'] = email['subject']
+ if self.subject:
+ msg['Subject'] = email['subject']
msg['From'] = email['from']
msg['To'] = email['to']

0 comments on commit 94dd306

Please sign in to comment.