1<testcase> 2<info> 3<keywords> 4SMTP 5MULTIPART 6</keywords> 7</info> 8 9# 10# Server-side 11<reply> 12</reply> 13 14# 15# Client-side 16<client> 17<server> 18smtp 19</server> 20 <name> 21SMTP multipart using mime API 22 </name> 23<stdin> 24From: different 25To: another 26 27body 28</stdin> 29 <command> 30smtp://%HOSTIP:%SMTPPORT/646 --mail-rcpt recipient@example.com --mail-from sender@example.com -F "=(;type=multipart/alternative" -F "= <body>This is the html version</body>;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=<log/headers646" -H "From: different" -H "To: another" -H "Reply-To: <followup@example.com>" 31</command> 32<file1 name="log/test646.txt"> 33This is an attached file. 34 35It may contain any type of data. 36</file1> 37<file2 name="log/headers646"> 38# This line is a comment 39X-fileheader1: This is a header from a file 40 41# This line is another comment. It precedes a folded header. 42X-fileheader2: This is 43#a 44 folded header 45</file2> 46</client> 47 48# 49# Verify data after the test has been "shot" 50<verify> 51<strippart> 52s/^--------------------------[a-z0-9]*/------------------------------/ 53s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/ 54</strippart> 55<protocol> 56EHLO 646 57MAIL FROM:<sender@example.com> 58RCPT TO:<recipient@example.com> 59DATA 60QUIT 61</protocol> 62<upload> 63Content-Type: multipart/mixed; boundary=---------------------------- 64Mime-Version: 1.0 65From: different 66To: another 67Reply-To: <followup@example.com> 68 69------------------------------ 70Content-Type: multipart/alternative; boundary=---------------------------- 71 72------------------------------ 73Content-Type: text/html 74Content-Transfer-Encoding: 8bit 75X-test1: this is a header 76X-test2: this is another header 77 78<body>This is the html version</body> 79------------------------------ 80X-fileheader1: This is a header from a file 81X-fileheader2: This is #a folded header 82 83This is the plain text version 84-------------------------------- 85 86------------------------------ 87Content-Disposition: attachment; filename="test646.txt" 88X-fileheader1: This is a header from a file 89X-fileheader2: This is #a folded header 90 91This is an attached file. 92 93It may contain any type of data. 94 95-------------------------------- 96. 97</upload> 98</verify> 99</testcase> 100