werx / email
CI Email 的 Composer 友好包装器。
1.2.1
2022-06-27 15:05 UTC
Requires
- php: >= 5.4
Requires (Dev)
- guzzlehttp/guzzle: 4.2.*@dev
- phpunit/phpunit: 3.7.*
README
在 CodeIgniter 之外使用 CodeIgniter 的邮件库。
完整文档请访问 http://ellislab.com/codeigniter/user-guide/libraries/email.html
用法
$email = new \werx\Email\Message(); $email->clear(); $email->from('me@example.com', 'My Name'); $email->to('you@example.com'); $email->subject('your subject line'); $email->attach($attachment, 'attachment', 'filename.html', 'text/html'); $email->message('Message body goes here.'); $email->send();
安装
此包可通过 Composer 以 werx/email 的形式安装和自动加载。如果您不熟悉 PHP 的 Composer 依赖管理器,您应该首先阅读这篇文档。
$ composer require werx/email --prefer-dist
测试
此包提供了单元测试。要运行它们,您必须安装并运行 MailCatcher。
$ vendor/bin/phpunit