Stampie 介绍
Stampie 是简单的 API 包装,为不同 Email
(例如Postmark、SendGrid)提供 API
。它易于使用,并且能整合进你的应用程序中。
示例代码:
<?PHP // Stampie.phar does Autoloading through its Stup.PHP require '/path/to/stampie.phar'; class Message extends \Stampie\Message { public function getFrom() { return '[email protected]'; } public function getSubject() { return 'You are trying out Stampie'; } public function getText() { return 'So what do you think about it?'; } } $adapter = new Stampie\Adapter\Buzz(new Buzz\browser()); $mailer = new Stampie\Mailer\SendGrid($adapter, 'username:password'); // Returns Boolean true on success or throws an HttpException for error // messages not recognized by SendGrid api or ApiException for kNown errors. $mailer->send(new Message('[email protected]'));
Stampie 官网
https://github.com/henrikbjorn/Stampie
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。