-
-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#500: [bug] Fix parsing addresses from headers in EML files, like a D…
…isposition-Notification-To with umlaut
- Loading branch information
Showing
5 changed files
with
144 additions
and
24 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
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 |
---|---|---|
|
@@ -175,6 +175,13 @@ public void testProblematicEmbeddedImage() { | |
assertThat(s1.getHTMLText()).containsPattern("\"cid:DB294AA3-160F-4825-923A-B16C8B674543@home\""); | ||
} | ||
|
||
@Test | ||
public void testProblematicUmlautInDispositionNotificationTo() { | ||
Email s1 = EmailConverter.emlToEmail(new File(RESOURCE_TEST_MESSAGES + "/#500 Email with problematic umlaut in Disposition-Notification-To.eml")); | ||
EmailAssert.assertThat(s1).hasFromRecipient(new Recipient("Könok, Danny [Fake Company & Co. KG]", "[email protected]", null)); | ||
EmailAssert.assertThat(s1).hasDispositionNotificationTo(new Recipient("Könok, Danny [Fake Company & Co. KG]", "[email protected]", null)); | ||
} | ||
|
||
@Test | ||
public void testProblematic8BitContentTransferEncoding() { | ||
Email s1 = EmailConverter.emlToEmail(new File(RESOURCE_TEST_MESSAGES + "/#485 Email with 8Bit Content Transfer Encoding.eml")); | ||
|
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
112 changes: 112 additions & 0 deletions
112
...urces/test-messages/#500 Email with problematic umlaut in Disposition-Notification-To.eml
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 |
---|---|---|
@@ -0,0 +1,112 @@ | ||
From: | ||
=?iso-8859-1?Q?K=F6nok=2C_Danny_=5BFake_Company_=26_Co=2E_K?= | ||
=?iso-8859-1?Q?G=5D?= <[email protected]> | ||
To: "Bestellung [Fake Company]" | ||
<[email protected]> | ||
Subject: Test | ||
Disposition-Notification-To: | ||
=?iso-8859-1?Q?K=F6nok=2C_Danny_=5BFake_Company_=26_Co=2E_K?= | ||
=?iso-8859-1?Q?G=5D?= <[email protected]> | ||
Date: Thu, 28 Mar 2024 14:07:46 +0100 | ||
Message-ID: <[email protected]> | ||
Accept-Language: de-DE, en-US | ||
Content-Language: de-DE | ||
Content-Type: text/html; charset="iso-8859-1" | ||
Content-Transfer-Encoding: quoted-printable | ||
MIME-Version: 1.0 | ||
|
||
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= | ||
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = | ||
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= | ||
//www.w3.org/TR/REC-html40"> | ||
<head> | ||
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-= | ||
1"> | ||
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)"> | ||
<style><!-- | ||
/* Font Definitions */ | ||
@font-face | ||
{font-family:"Cambria Math"; | ||
panose-1:2 4 5 3 5 4 6 3 2 4;} | ||
@font-face | ||
{font-family:Calibri; | ||
panose-1:2 15 5 2 2 2 4 3 2 4;} | ||
/* Style Definitions */ | ||
p.MsoNormal, li.MsoNormal, div.MsoNormal | ||
{margin:0cm; | ||
margin-bottom:.0001pt; | ||
font-size:11.0pt; | ||
font-family:"Calibri",sans-serif; | ||
mso-fareast-language:EN-US;} | ||
a:link, span.MsoHyperlink | ||
{mso-style-priority:99; | ||
color:#0563C1; | ||
text-decoration:underline;} | ||
a:visited, span.MsoHyperlinkFollowed | ||
{mso-style-priority:99; | ||
color:#954F72; | ||
text-decoration:underline;} | ||
span.E-MailFormatvorlage17 | ||
{mso-style-type:personal-compose; | ||
font-family:"Calibri",sans-serif; | ||
color:windowtext;} | ||
..MsoChpDefault | ||
{mso-style-type:export-only; | ||
font-family:"Calibri",sans-serif; | ||
mso-fareast-language:EN-US;} | ||
@page WordSection1 | ||
{size:612.0pt 792.0pt; | ||
margin:70.85pt 70.85pt 2.0cm 70.85pt;} | ||
div.WordSection1 | ||
{page:WordSection1;} | ||
--></style><!--[if gte mso 9]><xml> | ||
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> | ||
</xml><![endif]--><!--[if gte mso 9]><xml> | ||
<o:shapelayout v:ext=3D"edit"> | ||
<o:idmap v:ext=3D"edit" data=3D"1" /> | ||
</o:shapelayout></xml><![endif]--> | ||
</head> | ||
<body lang=3D"DE" link=3D"#0563C1" vlink=3D"#954F72"> | ||
<div class=3D"WordSection1"> | ||
<p class=3D"MsoNormal"><span lang=3D"EN-US">Hallo,<o:p></o:p></span></p> | ||
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p> | ||
<p class=3D"MsoNormal"><span lang=3D"EN-US">Lirumlarum – 02.04.2= | ||
024<o:p></o:p></span></p> | ||
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p> | ||
<p class=3D"MsoNormal"><span lang=3D"EN-US">2,5t 550<o:p></o:p></span></p> | ||
<p class=3D"MsoNormal"><span lang=3D"EN-US">1,2t 997<o:p></o:p></span></p> | ||
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p> | ||
<p class=3D"MsoNormal"><span lang=3D"EN-US">Danke.<o:p></o:p></span></p> | ||
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p> | ||
<p class=3D"MsoNormal"><span lang=3D"EN-US">Gr=FC=DFe,<o:p></o:p></span></p= | ||
> | ||
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p> | ||
</div> | ||
<p style=3D"FONT-SIZE: 12pt; FONT-FAMILY: Calibri"><font style=3D"FONT-SIZE= | ||
: 12pt; FONT-FAMILY: Calibri"><span style=3D"FONT-SIZE: 12pt"><strong><span= | ||
style=3D"FONT-SIZE: 11pt"><span style=3D"FONT-SIZE: 12pt">Danny K=F6nok<= | ||
/span></span></strong></span></font></p> | ||
<table style=3D"FONT-SIZE: 11pt; FONT-FAMILY: Calibri"> | ||
<tbody> | ||
<tr> | ||
<td colspan=3D"2">xxx/ Faktura</td> | ||
</tr> | ||
</tbody> | ||
<tbody> | ||
<tr> | ||
<td>Telefon:</td> | ||
<td>+49 0000 / 000-000</td> | ||
</tr> | ||
<tr> | ||
<td></td> | ||
</tr> | ||
<tr> | ||
<td>Email:</td> | ||
<td>[email protected]</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<br> | ||
</body> | ||
</html> | ||
. |