#!/usr/bin/env python # -*- coding: utf-8 -*- import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText def send_msg( from_addr, to_addrs = [], cc_addrs = [], bcc_addrs = [], subject = "", body_html = "", body_text = ""): msg = MIMEMultipart('alternative') msg['Subject'] = subject msg['From'] = from_addr msg['To'] = ",".join(to_addrs) if cc_addrs !=[]: msg[