cnorton-webdev/easy-mailinator
Composer 安装命令:
composer require cnorton-webdev/easy-mailinator
包简介
PHP wrapper library for Mailinator.com API
README 文档
README
PHP wrapper library for the Mailinator API
API Token
To obtain an API token for Mailinator, you must first create a Mailinator account. API access then can be obtained by purchasing an upgrade plan here and then obtain your API token at https://www.mailinator.com/settings.jsp
Requirements
In order to use this, you must have the cURL extension installed on your server. PHP 5.5 or higher recommended.
Installation
composer require cnorton-webdev/easy-mailinator
Public inbox example usage
$token = 'your_token_goes_here'; $mail = new easy_mailinator($token); // Retrieve messages for an inbox $name = 'some_name_here'; $messages = $mail->inbox($name); // Show message count - MUST be called AFTER getting messages otherwise will return 0 $message_count = $mail->get_mail_count(); // Get message content $message = $mail->get($msg_id); // Delete a message $is_deleted = $mail->delete($msg_id); // Retrieve saved messages $saved_messages = $mail->saved(); // Get saved messages count - MUST be called AFTER getting messages otherwise will return 0 $saved_count = $mail->get_saved_count();
Private domain example usage
$token = 'your_token_goes_here'; $mail = new easy_mailinator($token, true); // Retrieve messages for private domain inbox $messages = $mail->private_domain(); // Show private message count - MUST be called AFTER getting messages $private_message_count = $mail->get_private_count(); // Retrieve and delete messages the same as public inbox example
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-28