def send_email(self, email):
        msg = MIMEText(email['body'])
        if self.subject:
          msg['Subject'] = email['subject']
        msg['From'] = email['from']
        msg['To'] = self.COMMASPACE.join(email['to'])

        try:
            self.send_smtp(msg, email['to'])
        except Exception, e:
            self.write_stderr("Error sending email: %s\n" % e)
dataset/ETHPy150Open XiaoMi/minos/supervisor/superlance/process_state_email_monitor.py/ProcessStateEmailMonitor.send_email/original