定制 sendloop/mta-api-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sendloop/mta-api-php

最新稳定版本:1.2.0

Composer 安装命令:

composer require sendloop/mta-api-php

包简介

API client library for Sendloop MTA email as a service platform

关键字:

README 文档

README

Sendloop MTA is a transaction email delivery gateway and this PHP SDK lets you to use API easily.

Quick Start

First, let's install the library with composer:

composer require sendloop/mta-api-php 

Initialize the mailer with your API key:

require_once "vendor/autoload.php"; // Include composer autoloader $mailer = new \Sendloop\MTA\Mailer("YOUR-API-KEY-HERE"); 

You can grab your API key from Settings > API Settings page on your Sendloop account.

After initializing the mailer, let's create a message:

$message = new \Sendloop\MTA\Message(); $message->setFrom("Sendloop Developers", "hello@sendloop.com"); $message->setReplyTo("Sendloop", "hello@sendloop.com"); $message->setSubject("Quick start guide to Sendloop MTA PHP SDK"); $message->setTextContent("..."); $message->setHTMLContent("..."); 

and send the message to our recipient with mailer:

$messageStatusID = $mailer->send("test@recipient.com", $message, ["custom_arg_1" => "my_test_value"]); 

or send the message to our recipient with a name:

$messageStatusID = $mailer->send(["first last name", "test@recipient.com"], $message, ["custom_arg_1" => "my_test_value"]); 

or send the message with personalization and options:

$messageStatusID = $mailer->send( ["first last name", "test@recipient.com"], // recipient $message, // message ["custom_arg_1" => "my_test_value"], // custom args [ // merge vars "name" => "Recipient name", "account_id" => 1, "purchased" => true ], [ // options "TrackOpens" => true, "TrackClicks" => true, "TrackECommerce" => true, "TrackGA" => true, "Tags" => ["welcome_email", "to_user"], "EmailID" => 1 // Draft ID ] ); 

Later get the status of the delivery:

$statusDetails = $mailer->status($messageStatusID); 

or get the status of the latest 50 deliveries:

$statusDetails = $mailer->status(); 

统计信息

  • 总下载量: 27.28k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 4
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固