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