refactor: don't reconstruct mimeBody

This commit is contained in:
James Houlahan
2020-08-06 10:27:08 +02:00
parent 7e1af9ff4e
commit 0e7e13211b
39 changed files with 311 additions and 533 deletions

View File

@ -27,4 +27,4 @@ Content-Transfer-Encoding: 7bit
</body>
</html>
--------------22BC647264E52252E386881A--
--------------22BC647264E52252E386881A--

View File

@ -1,17 +0,0 @@
Content-Type: multipart/mixed; boundary=longrandomstring
From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
This is a multi-part message in MIME format.
--longrandomstring
Content-Transfer-Encoding: quoted-printable
body
--longrandomstring
Content-Transfer-Encoding: quoted-printable
some other part of the message
--longrandomstring--
.

View File

@ -1,19 +0,0 @@
Content-Type: multipart/alternative; boundary="0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d"
From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
This is a multi-part message in MIME format.
--0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html
<html><body>This is body of <b>HTML mail</b> without attachment</body></htm=
l>
--0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain
This is body of *HTML mail* without attachment
--0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d--
.

View File

@ -1,19 +0,0 @@
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d"
From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
This is a multi-part message in MIME format.
--0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d
Content-Transfer-Encoding: 7bit
Content-Type: text/html
<html><body>This is body of <b>HTML mail</b> without attachment</body></html>
--0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d
Content-Transfer-Encoding: 7bit
Content-Type: text/plain
This is body of *HTML mail* without attachment
--0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d--
.

View File

@ -2,4 +2,4 @@ From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
Content-Type: text/html
<html><head><meta charset="ISO-8859-2"></head><body>latin2 <20><><EFBFBD><EFBFBD></body></html>
<html><head><meta charset="ISO-8859-2"></head><body>latin2 <20><><EFBFBD><EFBFBD></body></html>

View File

@ -1,52 +0,0 @@
Content-Type: multipart/mixed; boundary=longrandomstring
From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
This is a multi-part message in MIME format.
--longrandomstring
Content-Type: multipart/alternative; boundary="0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d"
This is a multi-part message in MIME format.
--0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html
<html><body>This is body of <b>HTML mail</b> with attachment</body></html>
--0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain
This is body of *HTML mail* with attachment
--0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d--
.
--longrandomstring
Content-Disposition: inline
Content-Transfer-Encoding: base64
Content-Type: image/png
iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAABGdBTUEAALGPC/xhBQAAACBjSFJ
NAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAhGVYSWZNTQAqAAAACAAFAR
IAAwAAAAEAAQAAARoABQAAAAEAAABKARsABQAAAAEAAABSASgAAwAAAAEAAgAAh2kABAAAAAEAA
ABaAAAAAAAAASwAAAABAAABLAAAAAEAA6ABAAMAAAABAAEAAKACAAQAAAABAAAACKADAAQAAAAB
AAAACAAAAAAAXWZ6AAAACXBIWXMAAC4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GZkeEvw98/f
5j//2P4yCvxq/nU7zVs//8yM2gzMMitOnnu5cUff/8ff/v5/5Xf///vuHBhJcSRDAws9aEMr38c
W7XjNgvzexZ2rn9vbjx/IXl/M9iLM2fOZAUAKCZv7dU+UgAAAAAASUVORK5CYII=
--longrandomstring--
.

View File

@ -1,31 +0,0 @@
Content-Type: multipart/mixed; boundary=longrandomstring
From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
This is a multi-part message in MIME format.
--longrandomstring
Content-Type: multipart/alternative; boundary="0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d"
This is a multi-part message in MIME format.
--0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html
<html><body>This is body of <b>HTML mail</b> with attachment</body></html>
--0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain
This is body of *HTML mail* with attachment
--0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d--
.
--longrandomstring
Content-Transfer-Encoding: base64
Content-Type: application/octet-stream
aWYgeW91IGFyZSByZWFkaW5nIHRoaXMsIGhpIQ==
--longrandomstring--
.

View File

@ -1,5 +0,0 @@
Content-Transfer-Encoding: quoted-printable
From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
body

View File

@ -1,5 +0,0 @@
Content-Transfer-Encoding: 7bit
From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
body

View File

@ -1,38 +0,0 @@
Content-Type: multipart/related; boundary=longrandomstring
From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
This is a multi-part message in MIME format.
--longrandomstring
Content-Transfer-Encoding: quoted-printable
body
--longrandomstring
Content-Disposition: inline
Content-Transfer-Encoding: base64
Content-Type: image/png
iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAABGdBTUEAALGPC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KPC94OnhtcG1ldGE+CgZBD4sAAAEISURBVBgZY2CAAO5F
x07Zz96xZ0Pn4lXqIKGGhgYmsFTHvAWdW6/dvnb89Yf/B5+9/r/y9IXzbVPahCH6/jMysfAJygo
JC2r++/T619Mb139J8HIb8Gs5hYMUzJ+/gJ1Jmo9H6c+L5wz3bt5iEeLmYOHn42fQ4vyacqGNQS
0xMfEHc7Cvl6CYho4rh5jUPyYefqafLKyMbH9+/d28/dFfdWtfDaZvTy7Zvv72nYGZkeEvw98/f
5j//2P4yCvxq/nU7zVs//8yM2gzMMitOnnu5cUff/8ff/v5/5Xf///vuHBhJcSRDAws9aEMr38c
W7XjNgvzexZ2rn9vbjx/IXl/M9iLM2fOZAUAKCZv7dU+UgAAAAAASUVORK5CYII=
--longrandomstring--
.

View File

@ -1,6 +0,0 @@
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ISO-8859-1
From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
=E9=E9=E9=E9=E9=E9=E9

View File

@ -1,17 +0,0 @@
Content-Type: multipart/mixed; boundary=longrandomstring
From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
This is a multi-part message in MIME format.
--longrandomstring
Content-Transfer-Encoding: quoted-printable
body
--longrandomstring
Content-Transfer-Encoding: base64
Content-Type: application/octet-stream
aWYgeW91IGFyZSByZWFkaW5nIHRoaXMsIGhpIQ==
--longrandomstring--
.

View File

@ -1,18 +0,0 @@
Content-Type: multipart/mixed; boundary=longrandomstring
From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
This is a multi-part message in MIME format.
--longrandomstring
Content-Transfer-Encoding: quoted-printable
body
--longrandomstring
Content-Disposition: attachment; filename*=utf-8'%F0%9F%98%81%F0%9F%98%82.txt
Content-Transfer-Encoding: base64
Content-Type: application/octet-stream
aWYgeW91IGFyZSByZWFkaW5nIHRoaXMsIGhpIQ==
--longrandomstring--
.

View File

@ -1,18 +0,0 @@
Content-Type: multipart/mixed; boundary=longrandomstring
From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
This is a multi-part message in MIME format.
--longrandomstring
Content-Transfer-Encoding: quoted-printable
body
--longrandomstring
Content-Disposition: attachment; filename*=utf-8''%F0%9F%98%81%F0%9F%98%82.txt
Content-Transfer-Encoding: base64
Content-Type: application/octet-stream
aWYgeW91IGFyZSByZWFkaW5nIHRoaXMsIGhpIQ==
--longrandomstring--
.

View File

@ -1,17 +0,0 @@
Content-Type: multipart/mixed; boundary=longrandomstring
From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
This is a multi-part message in MIME format.
--longrandomstring
Content-Transfer-Encoding: quoted-printable
body
--longrandomstring
Content-Disposition: attachment
Content-Transfer-Encoding: quoted-printable
attachment
--longrandomstring--
.

View File

@ -1,6 +0,0 @@
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain
From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
=E9=E9=E9=E9=E9=E9=E9

View File

@ -1,6 +0,0 @@
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain
From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
=F8=B9=F8=B9=F8=B9

View File

@ -1,6 +0,0 @@
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=utf-8
From: Sender <sender@pm.me>
To: Receiver <receiver@pm.me>
body