datalinx/squalomail-php-sdk 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

datalinx/squalomail-php-sdk

Composer 安装命令:

composer require datalinx/squalomail-php-sdk

包简介

PHP SDK for SqualoMail

README 文档

README

Packagist PHP Version Support Packagist Version Packagist Downloads Tests Conventional Commits Packagist License

About

Disclaimer: This is not an official SDK.

With this package you can use the SqualoMail API in your PHP project.

See the changelog here.

Requirements

  • PHP >= 7.4
  • CURL and JSON PHP extensions
  • Ubuntu is tested and supported, but should also work on Windows

Installing

Download it with composer:

composer require datalinx/squalomail-php-sdk

Usage

$api = new API('your API key here');

$request = new CreateRecipient($api);
$request->email = 'john@example.com';
$request->name = 'John';
$request->surname = 'Doe';

try {
    $response = $request->send();
    
    // Subscribed, see the CreateRecipientResponse class for details
    echo $response->getRecipient()->id;
}
catch (Exception $exception) {
    echo 'Oops, something went wrong: '. $exception->getMessage();
}

Requests implementation

All API endpoints are specified here.
However, only the following are implemented in this package currently.

Request Notes
Create recipient
Get recipient
Get recipient's lists See the GetRecipientLists class docblock for explanation.
Update recipient You can provide either the recipient ID or the email. If you provide both, the email address for the matching recipient ID will be updated.
Delete recipient You can delete recipients only by ID, so fetch the ID with a GetRecipient request first.
Create list
Delete list
Get list See the GetList::send() method docblock for the response data
Get list recipients Does not support pagination
Get lists details
Subscribe by email This works only for recipients that are already created. If re-subscribing, also set the "accept" parameter to "true".
Unsubscribe by email The "accept" attribute on the recipient is updated considering how you configured it in SqualoMail settings (Slovenian: "Po kliku na povezavo za odjavo naj prejemnika odjavi od"). You can also send a boolean here to force a change, but it will be ignored when the setting is set to the third option (Slovenian: "Prejemanja katerihkoli sporočil v prihodnje").

Contributing

If you have some suggestions how to make this package better, please open an issue or even better, submit a pull request.

Should you want to contribute, please see the development guidelines in the DataLinx PHP package template.

Changelog

All notable changes to this project are automatically documented in the CHANGELOG.md file using the release workflow, based on the release-please GitHub action.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

For all this to work, commit messages must follow the Conventional commits specification, which is also enforced by a Git hook.

Developer documentation

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-04-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固