How to add a "Body" to a python mime multipart(has attachment) email -
i using following snippet send email attachment. want add message in body describing attachment, how do it? email blank body. msg = mimemultipart() msg["from"] = emailfrom msg["to"] = emailto msg["subject"] = subject ctype, encoding = mimetypes.guess_type(filetosend) if ctype none or encoding not none: ctype = "application/octet-stream" maintype, subtype = ctype.split("/", 1) if maintype == "text": fp = open(filetosend) # note: should handle calculating charset attachment = mimetext(fp.read(), _subtype=subtype) fp.close() elif maintype == "image": fp = open(filetosend, "rb") attachment = mimeimage(fp.read(), _subtype=subtype) fp.close() elif maintype == "audio": fp = open(filetosend, "rb") attachment = mimeaudio(fp.read(), _subtype=subtype) fp.close()