1<testcase>
2<info>
3<keywords>
4IMAP
5APPEND
6MULTIPART
7</keywords>
8</info>
9
10#
11# Server-side
12<reply>
13</reply>
14
15#
16# Client-side
17<client>
18<server>
19imap
20</server>
21 <name>
22IMAP APPEND multipart using mime API
23 </name>
24 <command>
25imap://%HOSTIP:%IMAPPORT/647 -F "=(;type=multipart/alternative" -F "= <body>This is the html version</body>;type=text/html" -F "=This is the plain text version" -F "=)" -F "=@log/test647.txt" -H "Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)" -H "From: Fred Foobar <foobar@example.com>" -H "To: joe@example.com" -H "Message-Id: <B27397-0100000@example.com>" -H "Subject: afternoon meeting" -u user:secret
26</command>
27<file name="log/test647.txt">
28This is an attached file.
29
30It may contain any type of data.
31</file>
32</client>
33
34#
35# Verify data after the test has been "shot"
36<verify>
37<strippart>
38s/^--------------------------[a-z0-9]*/------------------------------/
39s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
40</strippart>
41<protocol>
42A001 CAPABILITY
43A002 LOGIN user secret
44A003 APPEND 647 (\Seen) {892}
45A004 LOGOUT
46</protocol>
47<upload>
48Content-Type: multipart/mixed; boundary=----------------------------
49Mime-Version: 1.0
50Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
51From: Fred Foobar <foobar@example.com>
52To: joe@example.com
53Message-Id: <B27397-0100000@example.com>
54Subject: afternoon meeting
55
56------------------------------
57Content-Type: multipart/alternative; boundary=----------------------------
58
59------------------------------
60Content-Type: text/html
61Content-Transfer-Encoding: 8bit
62
63<body>This is the html version</body>
64------------------------------
65
66This is the plain text version
67--------------------------------
68
69------------------------------
70Content-Disposition: attachment; filename="test647.txt"
71
72This is an attached file.
73
74It may contain any type of data.
75
76--------------------------------
77</upload>
78</verify>
79</testcase>
80