ideneal/emailoctopus 问题修复 & 功能扩展

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

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

ideneal/emailoctopus

最新稳定版本:1.2.0

Composer 安装命令:

composer require ideneal/emailoctopus

包简介

EmailOctopus Service Client Library

README 文档

README

Packagist GitHub license Travis branch Codacy branch

A PHP wrapper for EmailOctopus email marketing service.

For more information on how to set up your account, read the API docs.

Installation

To add the library in your project just type the following:

composer require ideneal/emailoctopus

Usage

First you need to retrieve the API key as explained in API docs. After that you could initialize the wrapper by adding the following code:

use Ideneal\EmailOctopus\EmailOctopus;

$emailOctopus = new EmailOctopus('YOUR-API-KEY');

Now you can perform the CRUD operations the API provides using the $emailOctopus instance.

Create new list

use Ideneal\EmailOctopus\Entity\MailingList;

$list = new MailingList();
$list->setName('My cool list');

$emailOctopus->createMailingList($list);

Add a contact to the previous list

use Ideneal\EmailOctopus\Entity\Contact;

$contact = new Contact();
$contact
    ->setEmail('john.doe@mail.com')
    ->setFirstName('John')
    ->setLastName('Doe')
;

$emailOctopus->createContact($contact, $list);

Retrieve all contacts from the previous list

$emailOctopus->getContactsByMailingList($list);

Remove contact from the previous list

$contact = $emailOctopus->getContactByMailingList('CONTACT-ID', $list);
$emailOctopus->deleteContact($contact, $list);

License

The repository is available as open source under the terms of the MIT License.

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 4
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-06