email = MIMEMultipart()
email['Subject'] = subject
email['From'] = _from
- email['To'] = to
+ email['To'] = ', '.join(to)
email.attach(MIMEText(message))
for file in reversed(files):
msg_id = sys.argv[7]
camera_id = sys.argv[8]
moment = sys.argv[9]
-
+
message = messages.get(msg_id)
subject = subjects.get(msg_id)
if not message or not subject:
logging.info('no email address specified')
sys.exit(0)
+ to = [t.strip() for t in re.split('[,;| ]', to)]
+ to = [t for t in to if t]
+
io_loop = IOLoop.instance()
def on_message(subject, message, files):