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