[ "debug" => $_ENV["LIVE_MAILBOX_DEBUG"] ?? false, ], 'accounts' => [ 'default' => [ 'host' => getenv("LIVE_MAILBOX_HOST"), 'port' => getenv("LIVE_MAILBOX_PORT"), 'encryption' => getenv("LIVE_MAILBOX_ENCRYPTION"), 'validate_cert' => getenv("LIVE_MAILBOX_VALIDATE_CERT"), 'username' => getenv("LIVE_MAILBOX_USERNAME"), 'password' => getenv("LIVE_MAILBOX_PASSWORD"), 'protocol' => 'imap', //might also use imap, [pop3 or nntp (untested)] ], ], ]); return self::$manager; } /** * Get a fixture message * @param string $template * * @return Message * @throws ReflectionException * @throws AuthFailedException * @throws ConnectionFailedException * @throws ImapBadRequestException * @throws ImapServerErrorException * @throws InvalidMessageDateException * @throws MaskNotFoundException * @throws MessageContentFetchingException * @throws ResponseException * @throws RuntimeException */ final public function getFixture(string $template, Config $config = null) : Message { $filename = implode(DIRECTORY_SEPARATOR, [__DIR__, "..", "messages", $template]); $message = Message::fromFile($filename, $config); self::assertInstanceOf(Message::class, $message); return $message; } }