summaryrefslogtreecommitdiff
path: root/tests/data/test646
blob: a53c340905f29853c31e81ed4423a321bce971af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<testcase>
<info>
<keywords>
SMTP
MULTIPART
</keywords>
</info>

#
# Server-side
<reply>
</reply>

#
# Client-side
<client>
<server>
smtp
</server>
 <name>
SMTP multipart using mime API
 </name>
<stdin>
From: different
To: another

body
</stdin>
 <command>
smtp://%HOSTIP:%SMTPPORT/646 --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=@log/headers646" -F "=)" -F "=@log/test646.txt;headers=<log/headers646" -H "From: different" -H "To: another" -H "Reply-To: <followup@example.com>"
</command>
<file1 name="log/test646.txt">
This is an attached file.

It may contain any type of data.
</file1>
<file2 name="log/headers646">
# This line is a comment
X-fileheader1: This is a header from a file 

# This line is another comment. It precedes a folded header.
X-fileheader2: This is 
#a
 folded header
</file2>
</client>

#
# Verify data after the test has been "shot"
<verify>
<strippart>
s/^--------------------------[a-z0-9]*/------------------------------/
s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
</strippart>
<protocol>
EHLO 646
MAIL FROM:<sender@example.com>
RCPT TO:<recipient@example.com>
DATA
QUIT
</protocol>
<upload>
Content-Type: multipart/mixed; boundary=----------------------------
Mime-Version: 1.0
From: different
To: another
Reply-To: <followup@example.com>

------------------------------
Content-Type: multipart/alternative; boundary=----------------------------

------------------------------
Content-Type: text/html
Content-Transfer-Encoding: 8bit
X-test1: this is a header
X-test2: this is another header

<body>This is the html version</body>
------------------------------
X-fileheader1: This is a header from a file
X-fileheader2: This is #a folded header

This is the plain text version
--------------------------------

------------------------------
Content-Disposition: attachment; filename="test646.txt"
X-fileheader1: This is a header from a file
X-fileheader2: This is #a folded header

This is an attached file.

It may contain any type of data.

--------------------------------
.
</upload>
</verify>
</testcase>