jox / cemail
dev-master
2014-05-08 12:28 UTC
Requires
- php: >=5.4
This package is not auto-updated.
Last update: 2024-09-28 14:19:22 UTC
README
此模块发送简单的电子邮件消息。在发送任何内容之前,它会对“收件人”和“发件人”的电子邮件地址进行清理和验证。该模块经过测试并针对Anax-MVC设计。
由Joakim Sehlstedt编写
安装
为了充分利用此模块,请使用gitclone克隆Anax-MVC的副本。Anax-MVC。
您可以从此存储库复制文件,或使用packagist.org/packages/jox/cemail上的composer包。
要从Anax前端控制器测试模块,请运行以下代码。
// Standard $di object creation $di = new \Anax\DI\CDIFactoryDefault(); // Set your services here $di->set('email', '\Jox\Email\CEmail'); // Standard injection of services into Anax $app object. $app = new \Anax\Kernel\CAnax($di);
在您的首选路由中运行此代码。
// Send email and recieve send status string $res = $app->email->sendEmail('from-whatever@example.com', 'to-whatever@example.com', 'Message Subjectline', 'Message body...');
您发送的结果将以字符串消息的形式显示在变量$res中。
您还可以从包中包含的webroot文件夹中的test.php文件测试函数。
别忘了更改示例中的电子邮件地址,否则您将看不到任何消息!
祝您好运!
许可证
此软件是免费软件,带有MIT许可证。
待办事项
历史记录
v1.0(最新版本)
初始发布。
版权所有2014年Joakim Sehlstedt