envialosimple/transaccional
最新稳定版本:v0.1.0
Composer 安装命令:
composer require envialosimple/transaccional
包简介
PHP SDK for EnvíaloSimple Transaccional
README 文档
README
EnvíaloSimple Transaccional - PHP SDK
Installation
composer require envialosimple/transaccional
Basic Usage
use EnvialoSimple\Transaccional; use EnvialoSimple\Transaccional\Helpers\Builder\MailParams; $estr = new Transaccional($your_api_key); $mailParams = new MailParams(); $mailParams ->setFrom('no-reply@mycompany.com', 'MyCompany Notifications') ->setTo('john.doe@example.com', 'John Doe') ->setReplyTo('do-reply@mycompany.com') ->setPreviewText('A glimpse of what comes next...') ->setSubject('This is a subject') ->setHtml('<h1>HTML emails are cool, {{ name }}</h1>') ->setText('Text emails are also cool, {{ name }}') ->setContext(['name' => 'John']) ; $estr->mail->send($mailParams);
Multiple Recipients Usage
use EnvialoSimple\Transaccional; use EnvialoSimple\Transaccional\Helpers\Builder\MailParams; $estr = new Transaccional($your_api_key); $mailParams = new MailParams(); $mailParams ->setFrom('no-reply@mycompany.com', 'MyCompany Notifications') ->setTo([ ["email" => 'john.doe@example.com', "name" => 'John Doe'], ["email" => 'jane.doe@example.com', "name" => 'Jane Doe'], ["email" => 'sean.doe@example.com'] ]) ->setReplyTo('do-reply@mycompany.com') ->setPreviewText('A glimpse of what comes next...') ->setSubject('This is a subject') ->setHtml('<h1>HTML emails are cool, {{ name }}</h1>') ->setText('Text emails are also cool, {{ name }}') ->setContext(['name' => 'John']) ; $estr->mail->send($mailParams);
统计信息
- 总下载量: 47
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-11-23