copernica/smtpeter-php
最新稳定版本:v1.0.1
Composer 安装命令:
composer require copernica/smtpeter-php
包简介
PHP lib to send emails with SMTPeter API
关键字:
README 文档
README
A library to abstract API calls to SMTPeter REST API. It exposes one class: Email. This class can be used to easily created email message that can be sent via SMTPeter.
Installation
Package can be installed via composer cli, executing following line.
composer require copernica/smtpeter-php
Example
Sending very simple email message can be done with following script.
/** * REST API token that can be obtained from SMTPeter website. */ $apiToken = ''; // create new instance of email message $email = new SMTPeter\Email($apiToken); // set the email $email->setFrom('Paweł Kuźnik <pawel.kuznik@copernica.com>'); $email->setSubject('SMTPeter test email'); $email->setText('text version'); $email->setHtml('<html><body><h1>HTML version</h1></body></html>'); // composer array of TO addresses and CC addresses $to = array('someuser@example.com'); $cc = array('someotheruser@example.com'); // set to and cc $email->setTo($to); $email->setCC($cc); // append recipients $email->appendRecipients($to); $email->appendRecipients($cc); // send the email $email->send();
统计信息
- 总下载量: 27
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-10-28