21 SMTP multipart using mime API
30 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>"
32 <file1 name="log/test646.txt">
33 This is an attached file.
35 It may contain any type of data.
37 <file2 name="log/headers646">
38 # This line is a comment
39 X-fileheader1: This is a header from a file
\r
41 # This line is another comment. It precedes a folded header.
42 X-fileheader2: This is
\r#a
48 # Verify data after the test has been "shot"
51 s/^--------------------------[a-z0-9]*/------------------------------/
52 s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
56 MAIL FROM:<sender@example.com>
\r
57 RCPT TO:<recipient@example.com>
\r
62 Content-Type: multipart/mixed; boundary=----------------------------
\r
66 Reply-To: <followup@example.com>
\r
68 ------------------------------
\r
69 Content-Type: multipart/alternative; boundary=----------------------------
\r
71 ------------------------------
\r
72 Content-Type: text/html
\r
73 Content-Transfer-Encoding: 8bit
\r
74 X-test1: this is a header
\r
75 X-test2: this is another header
\r
77 <body>This is the html version</body>
\r
78 ------------------------------
\r
79 X-fileheader1: This is a header from a file
\r
80 X-fileheader2: This is #a folded header
\r
82 This is the plain text version
\r
83 --------------------------------
\r
85 ------------------------------
\r
86 Content-Disposition: attachment; filename="test646.txt"
\r
87 X-fileheader1: This is a header from a file
\r
88 X-fileheader2: This is #a folded header
\r
90 This is an attached file.
92 It may contain any type of data.
94 --------------------------------
\r