tomi0 / mailhog-api-testing
邮件测试api。
3.0.0
2024-03-28 09:34 UTC
Requires
- php: ^7.3|^7.4|^8.0|^8.1|^8.2|^8.3
- ext-json: *
- guzzlehttp/guzzle: ^6.3.1|^7.0.1
Requires (Dev)
- phpmailer/phpmailer: ^6.5
- phpunit/phpunit: ^9
This package is not auto-updated.
Last update: 2024-09-26 12:01:46 UTC
README
测试您的邮件是否已发送
安装
composer require tomi0/mailhog-api-testing
用法
在测试中使用Mailhog测试特性
use Mailhog\MailhogTesting; class ClassName { use MailhogTesting; ... }
设置环境
$this->setUpMailhogEnviroment($host, $smtpPort, $webPort, $isHttps);
可用方法
// Check if message exsits (return bool) $this->messageExistsByContent($content); $this->messageExists($content); // Get all messages (return EmailMessage[]) $this->getAllMessages(); // Clear inbox (return bool) $this->clearInbox(); $this->emptyInbox();