hakimrazalan/enginemailer-php
最新稳定版本:v1.2.3
Composer 安装命令:
composer require hakimrazalan/enginemailer-php
包简介
EngineMailer PHP REST SDK
README 文档
README
Installation
Composer
To install through composer by using the following command:
composer require php-http/guzzle7-adapter hakimrazalan/enginemailer-php
HTTP Adapter
Refer PHP-HTTP Clients & Adapters for other supported clients and adapters.
Get Started
Creating client
To create EngineMailer client, use the following codes:
use HakimRazalan\EngineMailer\Client;
$client = Client::setup("<api-key>");
Alternatively, you could configure Http\Client\Common\HttpMethodsClient manually
use HakimRazalan\EngineMailer\Client;
$http = Laravie\Codex\Discovery::client();
$client = Client::setup("<api-key>", $http);
Usages
Currently this library only cater to send transactional email
use HakimRazalan\EngineMailer\Client;
$http = Laravie\Codex\Discovery::client();
$client = Client::setup("<api-key>", $http);
$emailSender = $client->sendEmail();
$response = $emailSender
->sendEmail()
->setToEmail("receiver@receiver.com")
->setSenderEmail("sender@sender.my")
->setSubject("Test subject")
->setSubmittedContent("Email content")
->handle();
For full supported parameter please refer EngineMailer documentation.
Note: Just append set infront of the parameter name to include in the request. eg. TemplateId to setTemplateId('<template-id>')
统计信息
- 总下载量: 122
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-06