mimepost/mimepost-php
最新稳定版本:v1.0.0
Composer 安装命令:
composer require mimepost/mimepost-php
包简介
Simple PHP SDK for MimePost API
README 文档
README
A simple and beginner‑friendly PHP client for the MimePost API.
It wraps a subset of the endpoints defined in the provided Postman collection and can be easily extended.
Installation
Use Composer:
composer require mimepost/mimepost-php
If you are not using Composer, include the src/Client.php file manually.
Usage
Send Email
<?php require 'vendor/autoload.php'; $client = new MimePost\Client('YOUR_API_TOKEN'); // Send an email using a template // Send an email using a template $response = $client->sendEmail([ 'template_uid' => 'welcome_email_test', 'subject' => 'Test Mail using MimePost Client', 'from_name' => 'Your Sender Name', 'from_email' => 'yoursender@example.com', 'to' => [ ['email' => 'to@example.com'] ], ]); print_r($response);
example output
/*
//example output
Array
(
[success] => 1
[error_code] => 0
[message] => Mails accepted
[queue_ids] => Array
(
[to@example.com] => Array
(
[status] => f8dcecc8-6728-4ead-8def-c463fd1b9620
)
)
)
*/
Additional helpers:
$templates = $client->listTemplates(); $domainList = $client->listDomains(); $stats = $client->getStats(['start_date' => '20250101', 'end_date' => '20250131']);
Extending
The Client::request() method is public. You can call any MimePost endpoint:
$result = $client->request('GET', 'webhooks');
License
MIT
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-10