SMTP MULTIPART # # Server-side # # Client-side smtp SMTP multipart using mime API From: different To: another body smtp://%HOSTIP:%SMTPPORT/646 --mail-rcpt recipient@example.com --mail-from sender@example.com -F "=(;type=multipart/alternative" -F "= This is the html version;headers=X-test1: this is a header;type=text/html;headers=X-test2: this is another header " -F "=This is the plain text version;headers=@log/headers646" -F "=)" -F "=@log/test646.txt;headers=" This is an attached file. It may contain any type of data. # This line is a comment X-fileheader1: This is a header from a file # This line is another comment. It precedes a folded header. X-fileheader2: This is #a folded header # # Verify data after the test has been "shot" s/^--------------------------[a-z0-9]*/------------------------------/ s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/ EHLO 646 MAIL FROM: RCPT TO: DATA QUIT Content-Type: multipart/mixed; boundary=---------------------------- Mime-Version: 1.0 From: different To: another Reply-To: ------------------------------ Content-Type: multipart/alternative; boundary=---------------------------- ------------------------------ Content-Type: text/html Content-Transfer-Encoding: 8bit X-test1: this is a header X-test2: this is another header This is the html version ------------------------------ X-fileheader1: This is a header from a file X-fileheader2: This is #a folded header This is the plain text version -------------------------------- ------------------------------ Content-Disposition: attachment; filename="test646.txt" X-fileheader1: This is a header from a file X-fileheader2: This is #a folded header This is an attached file. It may contain any type of data. -------------------------------- .