tigusigalpa/mailru 问题修复 & 功能扩展

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

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

tigusigalpa/mailru

Composer 安装命令:

composer require tigusigalpa/mailru

包简介

MailRu for business SendBox service API

README 文档

README

PHP wrapper of Mail.Ru for business to work with the API. For the moment its only Sendbox integration. Official documentation https://help.mail.ru/biz/sendbox/api

mailru-for-business-logo

Install

Client side

  1. Add your domain to Mail.Ru. Approve domain via any available method: DNS TXT record or HTML file or HTML meta-tag or change domain NS records to mail.ru

  2. Configure domain MX-records. Keep only Mail.Ru backed MX-records:

    • Host/subdomain: @
    • Value: emx.mail.ru
    • Priority: 10
  3. Configure SPF-record (TXT domain record):

    • Host/subdomain: @
    • Value: v=spf1 redirect=_spf.mail.ru
    • TTL: 21600

    If you are using any paid services like SMTP, your SPF-record may be another but only single one. For example, if you are using an SMTP service, SPF (TXT) record will be v=spf1 include:send-box.ru include:smtp.send-box.ru redirect=_spf.mail.ru

  4. Configure DKIM signature. There may be a up to 3 DKIM records, depending on number of connected services.

  5. Get API credentials. Go to https://mailer.i.bizml.ru/settings/, select an API tab, activate REST API, copy ID (CLIENT ID) and Secret (CLIENT SECRET).

Developer side

$ composer require tigusigalpa/mailru
require_once 'vendor/autoload.php';

Sendbox

Email

$email = new \Tigusigalpa\MailRu\Sendbox\Email($client_id, $client_secret);

SMS

$sms = new \Tigusigalpa\MailRu\Sendbox\SMS($client_id, $client_secret);

SMTP

$smtp = new \Tigusigalpa\MailRu\Sendbox\SMTP($client_id, $client_secret);

Available methods

Name Arguments
sendEmail(array $email) $email = ['html' => (string), 'text' => (string), 'template' => ['id' => (int), 'variables' => (string)], 'subject' => (string)]

Coming soon...

PHPUnit tests

Use environment variables to test API:

  • CLIENT_ID (required)
  • CLIENT_SECRET (required)
  • TIMEOUT (optional)

All coverage tests are coming soon...

License

MIT License

Author

Igor Sazonov (sovletig@gmail.com)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-10-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固