I want to create an email consisting of a single attachment (which I then need to pipe to sendmail for sending). Right now I simply invoke "mpack" via os.system(), which also takes care of sending the message, but I'd rather be independend of external binaries (except for sendmail)... How can I implement that in native Python?