2017-09-03 02:08:45 +08:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
IMAP
|
|
|
|
APPEND
|
|
|
|
MULTIPART
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Client-side
|
|
|
|
<client>
|
2022-09-26 21:38:41 +08:00
|
|
|
<features>
|
|
|
|
Mime
|
|
|
|
</features>
|
2017-09-03 02:08:45 +08:00
|
|
|
<server>
|
|
|
|
imap
|
|
|
|
</server>
|
2023-10-04 17:35:54 +08:00
|
|
|
<name>
|
2017-09-03 02:08:45 +08:00
|
|
|
IMAP APPEND multipart using mime API
|
2023-10-04 17:35:54 +08:00
|
|
|
</name>
|
|
|
|
<command>
|
2023-03-29 09:20:54 +08:00
|
|
|
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 "=@%LOGDIR/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
|
2017-09-03 02:08:45 +08:00
|
|
|
</command>
|
2023-03-29 09:20:54 +08:00
|
|
|
<file name="%LOGDIR/test%TESTNUMBER.txt">
|
2017-09-03 02:08:45 +08:00
|
|
|
This is an attached file.
|
|
|
|
|
|
|
|
It may contain any type of data.
|
|
|
|
</file>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<strippart>
|
2023-09-12 18:51:21 +08:00
|
|
|
s/^--------------------------[A-Za-z0-9]*/------------------------------/
|
|
|
|
s/boundary=------------------------[A-Za-z0-9]*/boundary=----------------------------/
|
2017-09-03 02:08:45 +08:00
|
|
|
</strippart>
|
|
|
|
<protocol>
|
|
|
|
A001 CAPABILITY
|
|
|
|
A002 LOGIN user secret
|
2023-09-12 18:51:21 +08:00
|
|
|
A003 APPEND %TESTNUMBER (\Seen) {940}
|
2017-09-03 02:08:45 +08:00
|
|
|
A004 LOGOUT
|
|
|
|
</protocol>
|
|
|
|
<upload>
|
|
|
|
Content-Type: multipart/mixed; boundary=----------------------------
|
|
|
|
Mime-Version: 1.0
|
|
|
|
Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
|
|
|
|
From: Fred Foobar <foobar@example.com>
|
|
|
|
To: joe@example.com
|
|
|
|
Message-Id: <B27397-0100000@example.com>
|
|
|
|
Subject: afternoon meeting
|
|
|
|
|
|
|
|
------------------------------
|
|
|
|
Content-Type: multipart/alternative; boundary=----------------------------
|
|
|
|
|
|
|
|
------------------------------
|
|
|
|
Content-Type: text/html
|
|
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
|
|
|
|
<body>This is the html version</body>
|
|
|
|
------------------------------
|
|
|
|
|
|
|
|
This is the plain text version
|
|
|
|
--------------------------------
|
|
|
|
|
|
|
|
------------------------------
|
2021-03-13 00:38:26 +08:00
|
|
|
Content-Disposition: attachment; filename="test%TESTNUMBER.txt"
|
2017-09-03 02:08:45 +08:00
|
|
|
|
|
|
|
This is an attached file.
|
|
|
|
|
|
|
|
It may contain any type of data.
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
</upload>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|