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