Skip to content

Commit

Permalink
Test case extended to include attachment filename decoding #410
Browse files Browse the repository at this point in the history
  • Loading branch information
Webklex committed Jun 26, 2023
1 parent f8f17f6 commit 510c4ea
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
8 changes: 8 additions & 0 deletions tests/issues/Issue410Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ public function testIssueEmail() {
$message = Message::fromFile($filename);

self::assertSame("☆第132号 「ガーデン&エクステリア」専門店のためのQ&Aサロン 【月刊エクステリア・ワーク】", (string)$message->subject);

$attachments = $message->getAttachments();

self::assertSame(1, $attachments->count());

$attachment = $attachments->first();
self::assertSame("☆第132号 「ガーデン&エクステリア」専門店のためのQ&Aサロン 【月刊エクステリア・ワーク】", $attachment->filename);
self::assertSame("☆第132号 「ガーデン&エクステリア」専門店のためのQ&Aサロン 【月刊エクステリア・ワーク】", $attachment->name);
}

}
15 changes: 11 additions & 4 deletions tests/messages/issue-410.eml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@ From: [email protected]
To: [email protected]
Subject: =?ISO-2022-JP?B?GyRCIXlCaBsoQjEzMhskQjlmISEhViUsITwlRyVzGyhCJhskQiUoJS8lOSVGJWolIiFXQGxMZ0U5JE4kPyRhJE4jURsoQiYbJEIjQSU1JW0lcyEhIVo3bjQpJSglLyU5JUYlaiUiISYlbyE8JS8hWxsoQg==?=
Date: Wed, 13 Sep 2017 13:05:45 +0200
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="------------B832AF745285AEEC6D5AEE42"

Hi
Hi
--------------B832AF745285AEEC6D5AEE42
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="=?ISO-2022-JP?B?GyRCIXlCaBsoQjEzMhskQjlmISEhViUsITwlRyVzGyhCJhskQiUoJS8lOSVGJWolIiFXQGxMZ0U5JE4kPyRhJE4jURsoQiYbJEIjQSU1JW0lcyEhIVo3bjQpJSglLyU5JUYlaiUiISYlbyE8JS8hWxsoQg==?="

SGkh
--------------B832AF745285AEEC6D5AEE42--

0 comments on commit 510c4ea

Please sign in to comment.