Skip to content

Commit

Permalink
Rename email files with .eml extension
Browse files Browse the repository at this point in the history
Signed-off-by: Elan Ruusamäe <glen@pld-linux.org>
  • Loading branch information
glensc committed Feb 28, 2021
1 parent 3e0766e commit 47a01fc
Show file tree
Hide file tree
Showing 6 changed files with 165 additions and 165 deletions.
2 changes: 1 addition & 1 deletion test/MessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ public function testHeaderUnfoldingWorksAsExpectedForMultipartMessages(): void
*/
public function testCanParseMultipartReport(): void
{
$raw = file_get_contents(__DIR__ . '/_files/laminas-mail-19.txt');
$raw = file_get_contents(__DIR__ . '/_files/laminas-mail-19.eml');
$message = Message::fromString($raw);
$this->assertInstanceOf(Message::class, $message);
$this->assertIsString($message->getBody());
Expand Down
8 changes: 4 additions & 4 deletions test/Storage/MessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class MessageTest extends TestCase

public function setUp(): void
{
$this->file = __DIR__ . '/../_files/mail.txt';
$this->file2 = __DIR__ . '/../_files/mail_multi_to.txt';
$this->file = __DIR__ . '/../_files/mail.eml';
$this->file2 = __DIR__ . '/../_files/mail_multi_to.eml';
}

public function testInvalidFile(): void
Expand Down Expand Up @@ -482,8 +482,8 @@ public function testMultivaluedToHeader(): void

public function filesProvider(): array
{
$filePath = __DIR__ . '/../_files/mail.txt';
$fileBlankLineOnTop = __DIR__ . '/../_files/mail_blank_top_line.txt';
$filePath = __DIR__ . '/../_files/mail.eml';
$fileBlankLineOnTop = __DIR__ . '/../_files/mail_blank_top_line.eml';

return [
// Description => [params]
Expand Down
188 changes: 94 additions & 94 deletions test/_files/laminas-mail-19.txt → test/_files/laminas-mail-19.eml
Original file line number Diff line number Diff line change
@@ -1,94 +1,94 @@
Date: Wed, 21 Aug 2013 00:22:27 -0700
From: Mail Delivery Subsystem <MAILER-DAEMON@localhost.localdomain>
Message-Id: <201308210722.r7L7Lpmx022081@localhost.localdomain>
To: <root@localhost.localdomain>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;boundary="r7L7Lpmx022081.1377069747/localhost.localdomain"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)
This is a MIME-encapsulated message
--r7L7Lpmx022081.1377069747/localhost.localdomain
The original message was received at Fri, 16 Aug 2013 00:00:48 -0700
from localhost.localdomain [127.0.0.1]
----- The following addresses had permanent fatal errors -----
<sysadmin@example.com>
----- Transcript of session follows -----
<sysadmin@example.com>... Deferred
Message could not be delivered for 5 days
Message will be deleted from queue
--r7L7Lpmx022081.1377069747/localhost.localdomain
Content-Type: message/delivery-status
Reporting-MTA: dns; localhost.localdomain
Arrival-Date: Fri, 16 Aug 2013 00:00:48 -0700
Final-Recipient: RFC822; sysadmin@internet.com
Action: failed
Status: 4.4.7
Last-Attempt-Date: Wed, 21 Aug 2013 00:22:27 -0700
--r7L7Lpmx022081.1377069747/localhost.localdomain
Content-Type: message/rfc822
Date: Fri, 16 Aug 2013 00:00:48 -0700
From: root <root@localhost.localdomain>
Message-Id: <201308160700.r7G70msc008297@localhost.localdomain>
To: sysadmin@example.com
Subject: MySQL Backup Log for example.com - 2013-08-16_00h00m
======================================================================
AutoMySQLBackup VER 2.5
http://sourceforge.net/projects/automysqlbackup/
Backup of Database Server - test.com
======================================================================
Backup Start Time Fri Aug 16 00:00:01 PDT 2013
======================================================================
Daily Backup of Database ( information_schema )
Rotating last weeks Backup...
removed `/backups'
----------------------------------------------------------------------
Daily Backup of Database ( confluence )
Rotating last weeks Backup...
removed `/backupnce.bz2'
----------------------------------------------------------------------
Daily Backup of Database ( crucible )
Rotating last weeks Backup...
removed `/backups/daily/.bz2'
----------------------------------------------------------------------
Daily Backup of Database ( jira )
Rotating last weeks Backup...
removed `/bal.bz2'
----------------------------------------------------------------------
Daily Backup of Database ( jira_4_2 )
Rotating last weeks Backup...
removed `/backups/dail.sql.bz2'
----------------------------------------------------------------------
Daily Backup of Database ( mysql )
Rotating last weeks Backup...
removed `/backups/dql.bz2'
----------------------------------------------------------------------
Backup End Fri Aug 16 00:00:48 PDT 2013
======================================================================
Total disk space used for backup storage..
Size - Location
62.21T /backups
======================================================================
If you find AutoMySQLBackup valuable please make a donation at
http://sourceforge.net/project/project_donations.php?group_id=101066
======================================================================
--r7L7Lpmx022081.1377069747/localhost.localdomain--
Date: Wed, 21 Aug 2013 00:22:27 -0700
From: Mail Delivery Subsystem <MAILER-DAEMON@localhost.localdomain>
Message-Id: <201308210722.r7L7Lpmx022081@localhost.localdomain>
To: <root@localhost.localdomain>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;boundary="r7L7Lpmx022081.1377069747/localhost.localdomain"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

This is a MIME-encapsulated message

--r7L7Lpmx022081.1377069747/localhost.localdomain

The original message was received at Fri, 16 Aug 2013 00:00:48 -0700
from localhost.localdomain [127.0.0.1]

----- The following addresses had permanent fatal errors -----
<sysadmin@example.com>

----- Transcript of session follows -----
<sysadmin@example.com>... Deferred
Message could not be delivered for 5 days
Message will be deleted from queue

--r7L7Lpmx022081.1377069747/localhost.localdomain
Content-Type: message/delivery-status
Reporting-MTA: dns; localhost.localdomain
Arrival-Date: Fri, 16 Aug 2013 00:00:48 -0700
Final-Recipient: RFC822; sysadmin@internet.com
Action: failed
Status: 4.4.7
Last-Attempt-Date: Wed, 21 Aug 2013 00:22:27 -0700
--r7L7Lpmx022081.1377069747/localhost.localdomain
Content-Type: message/rfc822
Date: Fri, 16 Aug 2013 00:00:48 -0700
From: root <root@localhost.localdomain>
Message-Id: <201308160700.r7G70msc008297@localhost.localdomain>
To: sysadmin@example.com
Subject: MySQL Backup Log for example.com - 2013-08-16_00h00m
======================================================================
AutoMySQLBackup VER 2.5
http://sourceforge.net/projects/automysqlbackup/
Backup of Database Server - test.com
======================================================================
Backup Start Time Fri Aug 16 00:00:01 PDT 2013
======================================================================
Daily Backup of Database ( information_schema )
Rotating last weeks Backup...
removed `/backups'
----------------------------------------------------------------------
Daily Backup of Database ( confluence )
Rotating last weeks Backup...
removed `/backupnce.bz2'

----------------------------------------------------------------------
Daily Backup of Database ( crucible )
Rotating last weeks Backup...
removed `/backups/daily/.bz2'

----------------------------------------------------------------------
Daily Backup of Database ( jira )
Rotating last weeks Backup...
removed `/bal.bz2'

----------------------------------------------------------------------
Daily Backup of Database ( jira_4_2 )
Rotating last weeks Backup...
removed `/backups/dail.sql.bz2'

----------------------------------------------------------------------
Daily Backup of Database ( mysql )
Rotating last weeks Backup...
removed `/backups/dql.bz2'

----------------------------------------------------------------------
Backup End Fri Aug 16 00:00:48 PDT 2013
======================================================================
Total disk space used for backup storage..
Size - Location
62.21T /backups

======================================================================
If you find AutoMySQLBackup valuable please make a donation at
http://sourceforge.net/project/project_donations.php?group_id=101066
======================================================================

--r7L7Lpmx022081.1377069747/localhost.localdomain--
54 changes: 27 additions & 27 deletions test/_files/mail.txt → test/_files/mail.eml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
To: foo@example.com
Subject: multipart
Date: Sun, 01 Jan 2000 00:00:00 +0000
From: =?UTF-8?Q?"Peter M=C3=BCller"?= <peter-mueller@example.com>
ContENT-type: multipart/alternative; boUNDary="crazy-multipart"
Message-ID: <CALTvGe4_oYgf9WsYgauv7qXh2-6=KbPLExmJNG7fCs9B=1nOYg@mail.example.com>
MIME-version: 1.0
multipart message
--crazy-multipart
Content-type: text/plain
The first part
is horizontal
--crazy-multipart
Content-type: text/x-vertical
T s p i v
h e a s e
e c r r
o t t
n i
d c
a
l
--crazy-multipart--
To: foo@example.com
Subject: multipart
Date: Sun, 01 Jan 2000 00:00:00 +0000
From: =?UTF-8?Q?"Peter M=C3=BCller"?= <peter-mueller@example.com>
ContENT-type: multipart/alternative; boUNDary="crazy-multipart"
Message-ID: <CALTvGe4_oYgf9WsYgauv7qXh2-6=KbPLExmJNG7fCs9B=1nOYg@mail.example.com>
MIME-version: 1.0

multipart message
--crazy-multipart
Content-type: text/plain
The first part
is horizontal
--crazy-multipart
Content-type: text/x-vertical
T s p i v
h e a s e
e c r r
o t t
n i
d c
a
l
--crazy-multipart--
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
To: foo@example.com
Subject: multipart
Date: Sun, 01 Jan 2000 00:00:00 +0000
From: =?UTF-8?Q?"Peter M=C3=BCller"?= <peter-mueller@example.com>
ContENT-type: multipart/alternative; boUNDary="crazy-multipart"
Message-ID: <CALTvGe4_oYgf9WsYgauv7qXh2-6=KbPLExmJNG7fCs9B=1nOYg@mail.example.com>
MIME-version: 1.0
multipart message
--crazy-multipart
Content-type: text/plain
The first part
is horizontal
--crazy-multipart
Content-type: text/x-vertical
T s p i v
h e a s e
e c r r
o t t
n i
d c
a
l
--crazy-multipart--

To: foo@example.com
Subject: multipart
Date: Sun, 01 Jan 2000 00:00:00 +0000
From: =?UTF-8?Q?"Peter M=C3=BCller"?= <peter-mueller@example.com>
ContENT-type: multipart/alternative; boUNDary="crazy-multipart"
Message-ID: <CALTvGe4_oYgf9WsYgauv7qXh2-6=KbPLExmJNG7fCs9B=1nOYg@mail.example.com>
MIME-version: 1.0

multipart message
--crazy-multipart
Content-type: text/plain
The first part
is horizontal
--crazy-multipart
Content-type: text/x-vertical
T s p i v
h e a s e
e c r r
o t t
n i
d c
a
l
--crazy-multipart--
22 changes: 11 additions & 11 deletions test/_files/mail_multi_to.txt → test/_files/mail_multi_to.eml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Return-Path: <sender@example.com>
Date: Sun, 01 Jan 2000 00:00:00 +0000
From: sender@example.com
To: =?ISO-8859-2?Q?nicpo=F1?= <bar@example.pl>, "foo" <foo@example.pl>
Subject: Subject text
Content-Type: text/html; charset=iso-8859-2
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
<div>html content</div>
Return-Path: <sender@example.com>
Date: Sun, 01 Jan 2000 00:00:00 +0000
From: sender@example.com
To: =?ISO-8859-2?Q?nicpo=F1?= <bar@example.pl>, "foo" <foo@example.pl>
Subject: Subject text
Content-Type: text/html; charset=iso-8859-2
Content-Transfer-Encoding: 8bit
Content-Disposition: inline

<div>html content</div>

0 comments on commit 47a01fc

Please sign in to comment.