bespoke/improvmx 问题修复 & 功能扩展

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

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

bespoke/improvmx

Composer 安装命令:

composer require bespoke/improvmx

包简介

ImprovMX API client library for Laravel PHP

README 文档

README

This repo contains the source for a Laravel client library for the ImprovMX API.

Software License Packagist Downloads Latest Version

Check out the change log, releases, license, code of conduct, and contribution guidelines.

Installation

This version supports PHP 7.2-8.0. To get started, simply require the project into an existing Laravel application using Composer.

composer require bespoke/improvmx

Follow these installation instructions if you do not already have composer installed.

The project has a service provider which is automatically configured in new versions of Laravel.

To get the project working, simply add your ImprovMX API key into your .env file.

IMPROVMX_KEY=XXXXXXXXXXXXXX

Getting Started

The recommended method for using the ImprovMX client is to access it using the Laravel service provider.

This will construct your client automatically using the API key within your .env file.

$improvMx = new ImprovMx();
$client = $improvMx->client();

Alternatively, an ImprovMX client can be constructed manually.

$client = new Bespoke\ImprovMX\Client("INPUT_API_KEY_MANUALLY");

Once the client has been constructed, the API can be consumed as follows:

$client->account()->getAccountDetails();
$client->domains()->list();

Example Usage

Account

$improvMx = new ImprovMX();

// Return the Account entity.
$accountDetails = $improvMx->client()->account()->getAccountDetails();

// Return a collection of white-labelled domains.
$domains = $improvMx->client()->account()->getWhiteLabeledDomains();

Domains

$improvMx = new ImprovMX();

// Return a collection of Domain entities.
$domains = $improvMx->client()->domains()->list();

// Returns the newly created Domain entity or null (if failed to create).
$improvMx->client()->domains()->add("domain.com", "email@email.com", "whitelabel-domain.com");

// Return the Domain entity (or null).
$domain = $improvMx->client()->domains()->get("test.com");

// Update the details for a domain - returns the Domain entity or null.
$improvMx->client()->domains()->update("domain.com", "email@email.com", "whitelabel-domain.com");

// Returns delete successful - true or false.
$success = $improvMx->client()->domains()->delete("domain.com");

// Returns a RecordValidity entity.
$details = $improvMx->client()->domains()->checkDomainValidity("domain.com");

Aliases

$improvMx = new ImprovMX();

// Return a collection of Alias entities for a domain.
$aliases = $improvMx->client()->aliases()->list("domain.com");

// This command sets up email forwarding from user@domain.com to forward@email.com.
// Returns the newly created Alias entity or null (if failed to create).
$improvMx->client()->aliases()->add("domain.com", "user", "forward@email.com");

// Return the Alias entity (or null) for a given alias e.g. (alias@domain.com).
$alias = $improvMx->client()->aliases()->get("domain.com", "alias");

// Update the forwarding address for an alias - returns the Alias entity or null.
$improvMx->client()->aliases()->update("domain.com", "alias", "forward@email.com");

// Returns delete successful - true or false.
$success = $improvMx->client()->aliases()->delete("domain.com", "alias");

Logs

$improvMx = new ImprovMX();

// Return a collection of Log entities for a domain.
$logs = $improvMx->client()->logs()->getDomainLogs("domain.com");

// Return a collection of Log entities for a domain's alias.
$logs = $improvMx->client()->logs()->getAliasLogs("domain.com", "alias");

SMTP Credentials

$improvMx = new ImprovMX();

// Return a collection of Credential entities for a domain.
$credentials = $improvMx->client()->smtpCredentials()->list("domain.com");

// Add a new SMTP account for a domain (returns with the Credential entity or null).
$logs = $improvMx->client()->smtpCredentials()->add("domain.com", "username", "password");

// Update the password for an SMTP account (by username) - returns the Credential entity or null.
$improvMx->client()->smtpCredentials()->update("domain.com", "username", "newPassword");

// Returns delete successful - true or false.
$success = $improvMx->client()->smtpCredentials()->delete("domain.com", "username");

Security

If you discover a security vulnerability within this package, please send an email to Bespoke Technology Labs at hello@bespoke.dev. All security vulnerabilities will be promptly addressed. You may view our full security policy here.

License

The ImprovMX API Client Library is licensed under The MIT License (MIT).

Credits

  • Lewis Smallwood - Bespoke Technology Labs

bespoke/improvmx 适用场景与选型建议

bespoke/improvmx 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.44k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2021 年 01 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「api」 「client」 「library」 「email」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 bespoke/improvmx 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 bespoke/improvmx 我们能提供哪些服务?
定制开发 / 二次开发

基于 bespoke/improvmx 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.44k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-01-28