1 #Test if MIME conversion work
5 draft="$MH_TEST_DIR/send-$$.draft"
7 profile="$MMH/profile-send"
9 cat "`mhparam profile`" - >"$profile" <<!
10 default-from: Bob <bob@example.org>
13 export MMHP="$profile"
16 From: Bob <bob@example.org>
18 Date: Sun, 25 Oct 2015 18:59:56 +0100
24 runandcheck 'send -debug "$draft" | replace_contentid' <<!
25 From: Bob <bob@example.org>
27 Date: Sun, 25 Oct 2015 18:59:56 +0100
30 Content-Type: text/plain; charset="us-ascii"
39 From: Bob <bob@example.org>
41 Date: Sun, 25 Oct 2015 18:59:56 +0100
44 Content-Type: text/plain; charset="us-ascii"
50 runandcheck 'send -debug "$draft"' <<!
51 From: Bob <bob@example.org>
53 Date: Sun, 25 Oct 2015 18:59:56 +0100
56 Content-Type: text/plain; charset="us-ascii"
69 Date: Fri, 05 Aug 2016 21:38:40 +0200
73 runandcheck 'send -debug "$draft" | replace_contentid' <<!
76 Date: Fri, 05 Aug 2016 21:38:40 +0200
78 Content-Type: text/plain; charset="us-ascii"
80 From: Bob <bob@example.org>
91 Date: Fri, 05 Aug 2016 21:38:56 +0200
96 runandcheck 'send -debug "$draft" | replace_contentid' <<!
99 Date: Fri, 05 Aug 2016 21:38:56 +0200
101 Content-Type: text/plain; charset="UTF-8"
103 Content-Transfer-Encoding: quoted-printable
104 From: Bob <bob@example.org>
117 Content-Type: text/plain; charset="us-ascii"
118 Date: Fri, 05 Aug 2016 21:42:16 +0200
122 runandcheck 'send -debug "$draft" | replace_contentid' <<!
126 Content-Type: text/plain; charset="us-ascii"
127 Date: Fri, 05 Aug 2016 21:42:16 +0200
128 From: Bob <bob@example.org>
140 Content-Type: text/html; charset="us-ascii"
141 Date: Fri, 05 Aug 2016 21:43:06 +0200
145 runandcheck 'send -debug "$draft"' <<!
149 Content-Type: text/html; charset="us-ascii"
150 Date: Fri, 05 Aug 2016 21:43:06 +0200
151 From: Bob <bob@example.org>
163 Content-Type: text/plain; charset="latin1"
164 Date: Fri, 05 Aug 2016 21:44:00 +0200
168 runandcheck 'send -debug "$draft"' <<!
172 Content-Type: text/plain; charset="latin1"
173 Date: Fri, 05 Aug 2016 21:44:00 +0200
174 From: Bob <bob@example.org>
182 # now something more complex with separate call to mhbuild(1)
188 Date: Fri, 05 Aug 2016 21:46:20 +0200
193 #text/plain tests/send/ulm.txt
195 #begin [Picture of an Amphioctopus marginatus] alternative
196 #image/png tests/send/amphioctopus-marginatus.png
197 Amphioctopus marginatus sitting in its portable home
198 composed of coconut shell pieces.
202 runandcheck 'mhbuild "$draft"' <<!
205 # Use static Content-ID headers values for reproducible results
206 replace_contentid "$draft" >"$draft.temp" && mv "$draft.temp" "$draft"
208 runandcheck 'mhlist -v -file "$draft"' <<!
209 msg part type/subtype size description
210 0 multipart/mixed 2343
211 boundary="----- =_aaaaaaaaaa0"
220 5 multipart/alternative 1593 Picture of an Amphioctopus marginatu
221 boundary="----- =_aaaaaaaaaa1"
228 runandcheck 'send -debug "$draft"' <<!
231 Date: Fri, 05 Aug 2016 21:46:20 +0200
233 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
235 From: Bob <bob@example.org>
237 ------- =_aaaaaaaaaa0
238 Content-Type: text/plain; charset="us-ascii"
243 ------- =_aaaaaaaaaa0
244 Content-Type: text/html; charset="us-ascii"
249 ------- =_aaaaaaaaaa0
250 Content-Type: text/plain; charset="us-ascii"
253 in ulm und um ulm und um ulm herum
255 ------- =_aaaaaaaaaa0
256 Content-Type: text/plain; charset="UTF-8"
258 Content-Transfer-Encoding: quoted-printable
262 ------- =_aaaaaaaaaa0
263 Content-Type: multipart/alternative; boundary="----- =_aaaaaaaaaa1"
265 Content-Description: Picture of an Amphioctopus marginatus
267 ------- =_aaaaaaaaaa1
268 Content-Type: image/png
270 Content-Transfer-Encoding: base64
272 iVBORw0KGgoAAAANSUhEUgAAADIAAAArBAMAAADIyMbRAAAABGdBTUEAALGPC/xhBQAAAAFzUkdC
273 AK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAA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0wOC0xMFQxODo0MTo1NyswMjowMDnWAU8AAAAldEVYdGRhdGU6bW9kaWZ5
288 ADIwMTYtMDgtMTBUMTg6NDE6NTcrMDI6MDBIi7nzAAAAAElFTkSuQmCC
290 ------- =_aaaaaaaaaa1
291 Content-Type: text/plain; charset="us-ascii"
294 Amphioctopus marginatus sitting in its portable home
295 composed of coconut shell pieces.
297 ------- =_aaaaaaaaaa1--
299 ------- =_aaaaaaaaaa0
300 Content-Type: text/plain; charset="us-ascii"
305 ------- =_aaaaaaaaaa0--