awsm/lib-mail
Composer 安装命令:
composer require awsm/lib-mail
包简介
Awesome mail functionality. Easy and clean mail creation and transportation.
README 文档
README
Easy and clean mail creation and transportation.
Version 1.0.0-beta-1
This little library allows you to create email objects easy sent by a selected transporter (PHP mail function, WordPress, etc.).
Example
<?php use AWSM\LibMail\Transporter\PhpMail; use AWSM\LibMail\Mail; use AWSM\LibMail\MailException; $mail = new Mail(); $transporter = new PhpMail(); try { $mail->addToEmail( 'john.doe@dummy.com' ); $mail->setFromName( 'Developer' ); $mail->setFromEmail( 'developer@dummy.com' ); $mail->setSubject( 'Read my mail!' ); $mail->setContent( 'Hello John! Greetings from the developer!' ); $transporter->setMail( $mail ); $transporter->send(); } catch ( MailException $e ) { echo $e->getMessage(); }
统计信息
- 总下载量: 119
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2020-06-04