On Feb 4, 2:50 pm, srinivasan srinivas <sri_anna...@yahoo.co.in> wrote: > Hi, > Could someone tell me the way to add body content to > 'email.mime.multipart.MIMEMultipart' instance? > > Thanks, > Srini
excerpt from one of the modules I use: def build_body(html, text=''): text = text.strip() and text or html2text(html).encode('ascii', 'xmlcharrefreplace') body = MIMEMultipart('alternative') body.attach(MIMEText(text)) body.attach(MIMEText(html, 'html')) return body HTH Justin -- http://mail.python.org/mailman/listinfo/python-list