PHPackages                             cakemail/cakemail - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. cakemail/cakemail

Abandoned → [https://cakemail.dev/reference](/?search=https%3A%2F%2Fcakemail.dev%2Freference)ArchivedLibrary[API Development](/categories/api)

cakemail/cakemail
=================

A simple client to get started with Cakemail Next-gen API

1.12.26(2y ago)016.1k↓33.3%MITPHPPHP &gt;=7.2.5

Since Aug 18Pushed 5mo ago4 watchersCompare

[ Source](https://github.com/cakemail/cakemail-php)[ Packagist](https://packagist.org/packages/cakemail/cakemail)[ RSS](/packages/cakemail-cakemail/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (30)Used By (0)

⚠️ Deprecation Notice
---------------------

[](#️-deprecation-notice)

**This repository is no longer maintained and should not be used in production environments.**

We recommend migrating to our official **Ng-API** for programmatic access to Cakemail services.

**Documentation and migration guide:**

---

Install
=======

[](#install)

Install the `cakemail` package using `composer`

```
$ composer require cakemail/cakemail
```

Usage
=====

[](#usage)

Create an object from the `Cakemail\Api` class with your Cakemail username and password. The object will take care of all authorization mechanisms automatically.

```
$username = 'your@email.com';
$password = 'somepassword';

$api = new Api($username, $password);
```

Call one of the API operations (refer to the online documentation here)

```
$myAcount = $api->account->getSelf();
```

API operations
==============

[](#api-operations)

API operations accepts all the parameters in an array. You can use any parameter, in any order, but you must provide the required ones.

```
$filteredCampaigns = $api->campaign->list([
        'with_count' => true,
        'filter'     => 'type==recurring;name==Newsletter'
]);
```

Operation Examples
==================

[](#operation-examples)

Create a Sender
---------------

[](#create-a-sender)

```
use Cakemail\Lib\Model;

$sender = $api->sender->create([
   'create_sender' => new Model\CreateSender([
       'name'  => 'My Sender',
       'email' => 'someone@gmail.com'
   ])
]);

# look for the confirmation ID in your email inbox
$api->sender->confirm([
    'sender_id'      => $sender['id'],
    'confirm_sender' => new Model\ConfirmSender([
        'confirmation_id' => '[Confirmation ID]'
    ])
]);
```

Create a Contact List
---------------------

[](#create-a-contact-list)

```
use Cakemail\Lib\Model;

$myList = $api->list->create([
    'model_list' => new Model\ModelList([
        'name' => 'My new List',
        'default_sender' => new Model\Sender([
            'id' => $senderId
        ])
    ])
]);
```

Send a transactional email
--------------------------

[](#send-a-transactional-email)

```
use Cakemail\Lib\Model;

$myList = $api->transactional_email->send([
    'email' => new Model\Email([
        'email'   => 'destination@gmail.com',
        'sender'  => $sender,
        'content' => new Model\EmailContent([
            'subject'  => 'Subject line',
            'html'     => 'Email body',
            'encoding' => 'utf-8'
        ])
    ])
]);
```

Accessing data
--------------

[](#accessing-data)

The CakemailAPI always return its data under the 'data' key. For simplicity, the resource data is accessible from the returned response directly:

```
$myUser = $api->user->getSelf();

print_r($myUser['email']);
```

Iterate through lists
---------------------

[](#iterate-through-lists)

Some methods return a list of resources on which you can iterate directly:

```
$campaigns = $api->campaign->list();

foreach ($campaigns as $campaign) {
    $html = $api->campaign->render([
        'campaign_id' => $campaign['id']
    ])['html'];

    print_r("id: {$campaign['id']}, name: {$campaign['name']}, html: {$html}");
}
```

Pagination
----------

[](#pagination)

Pagination is stored in the 'pagination' key of all methods returning a list of resources:

```
$campaigns = $api->campaign->list(['with_count' => 'true']);
print_r("
          page:     " . $campaigns['pagination']['page'] . ",
          per_page: " . $campaigns['pagination']['per_page'] . ",
          count:    " . $campaigns['pagination']['count'] . "
          ");
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance47

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Recently: every ~81 days

Total

29

Last Release

1070d ago

PHP version history (2 changes)1.0.3PHP ^7.0

1.3.2PHP &gt;=7.2.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8978a57bb6bfca93e6abb28d29d3947097368acabf5303866a8429056bb625a?d=identicon)[demetrius@cakemail](/maintainers/demetrius@cakemail)

---

Top Contributors

[![demetrius-edelin](https://avatars.githubusercontent.com/u/6146339?v=4)](https://github.com/demetrius-edelin "demetrius-edelin (3 commits)")[![vlamanna](https://avatars.githubusercontent.com/u/160664?v=4)](https://github.com/vlamanna "vlamanna (2 commits)")

### Embed Badge

![Health badge](/badges/cakemail-cakemail/health.svg)

```
[![Health](https://phpackages.com/badges/cakemail-cakemail/health.svg)](https://phpackages.com/packages/cakemail-cakemail)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
