-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fix-time' of https://github.com/EdwinLove/parsemail int…
…o EdwinLove-fix-time
- Loading branch information
Showing
2 changed files
with
57 additions
and
4 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 |
---|---|---|
|
@@ -294,6 +294,42 @@ So, "Hello".`, | |
date: parseDate("Fri, 02 May 2019 11:25:35 +0300"), | ||
textBody: `plain text part`, | ||
}, | ||
10: { | ||
mailData: rfc5322exampleA12WithTimezone, | ||
from: []mail.Address{ | ||
{ | ||
Name: "Joe Q. Public", | ||
Address: "[email protected]", | ||
}, | ||
}, | ||
to: []mail.Address{ | ||
{ | ||
Name: "Mary Smith", | ||
Address: "[email protected]", | ||
}, | ||
{ | ||
Name: "", | ||
Address: "[email protected]", | ||
}, | ||
{ | ||
Name: "Who?", | ||
Address: "[email protected]", | ||
}, | ||
}, | ||
cc: []mail.Address{ | ||
{ | ||
Name: "", | ||
Address: "[email protected]", | ||
}, | ||
{ | ||
Name: "Giant; \"Big\" Box", | ||
Address: "[email protected]", | ||
}, | ||
}, | ||
messageID: "[email protected]", | ||
date: parseDate("Tue, 01 Jul 2003 10:52:37 +0200"), | ||
textBody: `Hi everyone.`, | ||
}, | ||
} | ||
|
||
for index, td := range testData { | ||
|
@@ -678,6 +714,16 @@ Message-ID: <[email protected]> | |
Hi everyone. | ||
` | ||
|
||
var rfc5322exampleA12WithTimezone = `From: "Joe Q. Public" <[email protected]> | ||
To: Mary Smith <[email protected]>, [email protected], Who? <[email protected]> | ||
Cc: <[email protected]>, "Giant; \"Big\" Box" <[email protected]> | ||
Date: Tue, 1 Jul 2003 10:52:37 +0200 (GMT) | ||
Message-ID: <[email protected]> | ||
Hi everyone. | ||
` | ||
|
||
|
||
//todo: not yet implemented in net/mail | ||
//once there is support for this, add it | ||
var rfc5322exampleA13 = `From: Pete <[email protected]> | ||
|