getFixture("issue-40.eml"); self::assertSame("Zly from", (string)$message->subject); self::assertSame([ 'personal' => '', 'mailbox' => 'faked_sender', 'host' => 'sender_domain.pl', 'mail' => 'faked_sender@sender_domain.pl', 'full' => 'faked_sender@sender_domain.pl', ], $message->from->first()->toArray()); self::assertSame([ 'personal' => '', 'mailbox' => 'real_sender', 'host' => 'sender_domain.pl', 'mail' => 'real_sender@sender_domain.pl', 'full' => ' ', ], (array)$message->return_path->first()); self::assertSame(true, $message->spoofed->first()); $config = $message->getConfig(); self::assertSame(false, $config->get("security.detect_spoofing_exception")); $config->set("security.detect_spoofing_exception", true); self::assertSame(true, $config->get("security.detect_spoofing_exception")); $this->expectException(SpoofingAttemptDetectedException::class); $this->getFixture("issue-40.eml", $config); } }