def multipart_content(*files):
outer = MIMEMultipart()<EOL>for fname in files:<EOL><INDENT>mtype = get_type(fname)<EOL>maintype, subtype = mtype.split('<STR_LIT:/>', <NUM_LIT:1>)<EOL>with open(fname) as f:<EOL><INDENT>msg = MIMEText(f.read(), _subtype=subtype)<EOL><DEDENT>msg.add_header('<STR_LIT>', '<STR_LIT>', <EOL>filename=os.path.basename(fname))<EOL>outer.attach(msg)<EOL><DEDENT>return outer.as_string()<EOL>
Returns a mutlipart content.
    Note:
      This script was clearly inspired by write-mime-multipart.