forked from DusanKasan/parsemail
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request DusanKasan#19 from k-yomo/support-html-in-multipar…
…t-mixed Add support for html in multipart/mixed
- Loading branch information
Showing
2 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -296,6 +296,26 @@ So, "Hello".`, | |
textBody: `plain text part`, | ||
}, | ||
10: { | ||
contentType: `multipart/mixed; boundary="0000000000007e2bb40587e36196"`, | ||
mailData: textHTMLInMultipart, | ||
subject: "Re: kern/54143 (virtualbox)", | ||
from: []mail.Address{ | ||
{ | ||
Name: "Rares", | ||
Address: "[email protected]", | ||
}, | ||
}, | ||
to: []mail.Address{ | ||
{ | ||
Name: "", | ||
Address: "[email protected]", | ||
}, | ||
}, | ||
date: parseDate("Fri, 02 May 2019 11:25:35 +0300"), | ||
textBody: ``, | ||
htmlBody: "<div dir=\"ltr\"><div>html text part</div><div><br></div><div><br><br></div></div>", | ||
}, | ||
11: { | ||
mailData: rfc5322exampleA12WithTimezone, | ||
from: []mail.Address{ | ||
{ | ||
|
@@ -331,7 +351,7 @@ So, "Hello".`, | |
date: parseDate("Tue, 01 Jul 2003 10:52:37 +0200"), | ||
textBody: `Hi everyone.`, | ||
}, | ||
11: { | ||
12: { | ||
contentType: "multipart/mixed; boundary=f403045f1dcc043a44054c8e6bbf", | ||
mailData: attachment7bit, | ||
subject: "Peter Foobar", | ||
|
@@ -358,7 +378,7 @@ So, "Hello".`, | |
}, | ||
}, | ||
}, | ||
12: { | ||
13: { | ||
contentType: "multipart/related; boundary=\"000000000000ab2e2205a26de587\"", | ||
mailData: multipartRelatedExample, | ||
subject: "Saying Hello", | ||
|
@@ -743,6 +763,20 @@ plain text part | |
--0000000000007e2bb40587e36196-- | ||
` | ||
|
||
var textHTMLInMultipart = `From: Rares <[email protected]> | ||
Date: Thu, 2 May 2019 11:25:35 +0300 | ||
Subject: Re: kern/54143 (virtualbox) | ||
To: [email protected] | ||
Content-Type: multipart/mixed; boundary="0000000000007e2bb40587e36196" | ||
--0000000000007e2bb40587e36196 | ||
Content-Type: text/html; charset="UTF-8" | ||
<div dir="ltr"><div>html text part</div><div><br></div><div><br><br></div></div> | ||
--0000000000007e2bb40587e36196-- | ||
` | ||
|
||
var rfc5322exampleA11 = `From: John Doe <[email protected]> | ||
Sender: Michael Jones <[email protected]> | ||
To: Mary Smith <[email protected]> | ||
|