mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Migrated away from PHP Mail Parser to the new WebKlex PHP IMAP Mail Parser this will open the way to support OAUTH2 for Mail servers such as Microsoft 365 and Google Workspaces
This commit is contained in:
33
plugins/php-imap/tests/issues/Issue382Test.php
Normal file
33
plugins/php-imap/tests/issues/Issue382Test.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/*
|
||||
* File: Issue382Test.php
|
||||
* Category: Test
|
||||
* Author: M.Goldenbaum
|
||||
* Created: 24.06.23 00:41
|
||||
* Updated: -
|
||||
*
|
||||
* Description:
|
||||
* -
|
||||
*/
|
||||
|
||||
namespace Tests\issues;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Webklex\PHPIMAP\Message;
|
||||
|
||||
class Issue382Test extends TestCase {
|
||||
|
||||
public function testIssueEmail() {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [__DIR__, "..", "messages", "issue-382.eml"]);
|
||||
$message = Message::fromFile($filename);
|
||||
|
||||
$from = $message->from->first();
|
||||
|
||||
self::assertSame("Mail Delivery System", $from->personal);
|
||||
self::assertSame("MAILER-DAEMON", $from->mailbox);
|
||||
self::assertSame("mta-09.someserver.com", $from->host);
|
||||
self::assertSame("MAILER-DAEMON@mta-09.someserver.com", $from->mail);
|
||||
self::assertSame("Mail Delivery System <MAILER-DAEMON@mta-09.someserver.com>", $from->full);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user