定制 bespoke/improvmx 二次开发

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

邮箱: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

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固