定制 adebayo27/tribearcmail 二次开发

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

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

adebayo27/tribearcmail

最新稳定版本:v1.0.1

Composer 安装命令:

composer require adebayo27/tribearcmail

包简介

A wrapper for sending mail and sms with tribearc mail api

README 文档

README

A wrapper for sending mail and sms with tribearc mail api

Installation

Require adebayo27/tribearcmail using composer.

Usage

Add the following to the .env file

TRIBEARC_MAIL_API_KEY="Your api key gotten from tribearc mail"
TRIBEARC_MAIL_FROM_NAME="Your from name"
TRIBEARC_MAIL_FROM_EMAIL="your from email"
TRIBEARC_MAIL_REPLY_TO="your reply to email"
TRIBEARC_MAIL_BUSINESS_ADDRESS="your business address (registered with tribe)"
TRIBEARC_MAIL_BUSINESS_NAME="your business name (registered with tribe)"

Example: using the library

<?php

use Adebayo27\Tribearcmail\TribearcMail;

$tribearc = new TribearcMail();

//send transactional email 
$response = $tribearc->tribearcSendMail('Subject', 'Email body', 'email address');

//send bulk email
$response = $tribearc->tribearcSendBulkMail('Subject', 'Email body', 'ade@mail.com,bayo@mail.com,koya@mail');


//send instant sms 
$response = $tribearc->tribearcSMSInstant(
    [
        "from" => "Kent",
        "to" => "+2348012345678",
        "message" => "Hello Adebayo",
    ]
);

//check sms balance
$response = $tribearc->tribearcCheckSMSBalance();

//check from email status
$response = $tribearc->tribearcCheckFromEmailStatus('hello@adebayo.com');

//send email to saved list
$response = $tribearc->tribearcSendEmailToSavedList(
    [        
        'title' => 'Campaign',
        'subject' => 'subject',
        'html_text' => 'Hello',
        'plain_text' => '', //optional
        'list_ids' => 'your list ids', //Required only if you set send_campaign to 1 and no segment_ids are passed in. List IDs should be single or comma-separated. The encrypted & hashed ids can be found under View all lists section named ID.
        'exclude_list_ids' => '', //Lists to exclude from your campaign. List IDs should be single or comma-separated. The encrypted & hashed ids can be found under View all lists section named ID. (optional)
        'track_opens' => '1', //Set to 0 to disable, 1 to enable and 2 for anonymous opens tracking.
        'query_string' => '', //eg. Google Analytics tags (optional)
        'brand_id' => '', //Required only if you are creating a 'Draft' campaign (send_campaign set to 0 or left as default). Brand IDs can be found under 'Brands' page named ID
        'track_clicks' => '1', //Set to 0 to disable, 1 to enable and 2 for anonymous opens tracking.
        'send_campaign' => '1', //Set to 1 if you want to send the campaign as well and not just create a draft. Default is 0.
        'segment_ids' => '', //Required only if you set send_campaign to 1 and no list_ids are passed in. Segment IDs should be single or comma-separated. Segment ids can be found in the segments setup page.
        'schedule_date_time' => '', //Campaign will be scheduled if a valid date/time is passed. Date/time format eg. June 15, 2021 6:05pm. The minutes part of the time has to be in increments of 5, eg. 6pm, 6:05pm, 6:10pm, 6:15pm.
        'schedule_timezone' => '', //Eg. 'America/New_York'. See the list of PHP's supported timezones. This parameter only applies if you're scheduling your campaign with schedule_date_time parameter. TribeArc will use your default timezone if this parameter is empty.
    ]

);

//subscribe to list
$response = $tribearc->tribearcSubscribeToList(
    [
        "name" => "Kent",
        "email" => "hello@adebayo.com",
        "list" => "your list id",
        "country" => "NG",
    ]
);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固