PHPackages                             coresender/coresender - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. coresender/coresender

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

coresender/coresender
=====================

The Coresender PHP SDK.

1.1.2(4y ago)10405MITPHPPHP ^7.1CI failing

Since Jul 1Pushed 4y ago5 watchersCompare

[ Source](https://github.com/coresender/coresender-sdk-php)[ Packagist](https://packagist.org/packages/coresender/coresender)[ RSS](/packages/coresender-coresender/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (8)Versions (5)Used By (0)

Coresender PHP SDK
==================

[](#coresender-php-sdk)

This is the officially supported PHP library for [Coresender](https://coresender.com). It allows you to quickly and easily integrate with our API and improve your email deliverability.

Prerequisites
-------------

[](#prerequisites)

- PHP version 7.1+
- The Coresender service. You can start with a free 100 emails/month developer plan and move to one of our [pricing plans](https://coresender.com/pricing) when you're done.

Installation
------------

[](#installation)

To install the SDK, you will need to be using [Composer](http://getcomposer.org/).

The Coresender PHP SDK is not hard coupled to Guzzle, Buzz or any other library that sends HTTP messages. Instead, it uses the [PSR-18](https://www.php-fig.org/psr/psr-18/) client abstraction. This will give you the flexibility to choose what [PSR-7 implementation and HTTP client](https://packagist.org/providers/php-http/client-implementation)you want to use.

Run the following command to get started:

```
composer require coresender/coresender kriswallsmith/buzz nyholm/psr7
```

Usage
-----

[](#usage)

Here's how to send an email using the SDK:

```
require 'vendor/autoload.php';

use Coresender\Coresender;
use Coresender\Helpers\EmailBuilder;

$builder = new EmailBuilder();
$builder
    ->setFrom('jean.luc@example.com', 'Jean-Luc Picard')
    ->addToRecipient('geordi@example.com', 'Geordi La Forge')
    ->setSubject('I need engines')
    ->setBodyText('Geordi, I need engines, now!')
    ->setBodyHtml('Geordi, I need engines, now!')
;

$sendingApi = Coresender::createSendEmailApi('', '');
$sendingApi->simpleEmail($builder->getEmail());
```

Here's how to send a batch of emails using the SDK:

```
require 'vendor/autoload.php';

use Coresender\Coresender;
use Coresender\Helpers\EmailBuilder;

$sendingApi = Coresender::createSendEmailApi('', '');

$builder = new EmailBuilder();
$builder
    ->setFrom('jean.luc@example.com', 'Jean-Luc Picard')
    ->addToRecipient('geordi@example.com', 'Geordi La Forge')
    ->setSubject('I need engines')
    ->setBodyText('Geordi, I need engines, now!')
    ->setBodyHtml('Geordi, I need engines, now!')
    ->addToReplyTo('deanna@example.com', 'Deanna Troi')
;
$sendingApi->addToBatch($builder->getEmail());

$builder = new EmailBuilder();
$builder
    ->setFrom('jean.luc@example.com', 'Jean-Luc Picard')
    ->addToRecipient('worf@example.com', 'Mr. Worf')
    ->setSubject('Rise shields')
    ->setBodyText('Mr. Worf, rise shields, now!')
    ->setBodyHtml('Mr. Worf, rise shields, now!')
;
$sendingApi->addToBatch($builder->getEmail());

$sendingApi->execute();
```

### Response

[](#response)

The result of an API call is a domain object.

```
$sendingApi = Coresender::createSendEmailApi('', '');
$result = $sendingApi->execute();

echo 'All accepted:' . $result->allAccepted();

foreach ($result as $entry) {
    echo $entry->getMessageId() . ': ' . $entry->getStatus();
}
```

### Debug logging

[](#debug-logging)

This SDK does minimal logging for error debugging purpose. To enable it pass any [PSR-3](https://www.php-fig.org/psr/psr-3/) logger instance, like Monolog.

```
use Monolog\Logger;

$logger = new Logger();

Coresender::setLogger($logger);
```

Contribute
----------

[](#contribute)

The Coresender PHP SDK is an open-source project released under MIT license. We welcome any contributions!

You can help by:

- Writing new code
- Creating issues if you find problems
- Helping others with their issues
- Reviewing PRs

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~210 days

Total

4

Last Release

1562d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/63645861?v=4)[Coresender](/maintainers/coresender)[@coresender](https://github.com/coresender)

---

Top Contributors

[![ppankowski-t](https://avatars.githubusercontent.com/u/225372503?v=4)](https://github.com/ppankowski-t "ppankowski-t (24 commits)")[![msztolcman](https://avatars.githubusercontent.com/u/7052?v=4)](https://github.com/msztolcman "msztolcman (8 commits)")[![slawekp](https://avatars.githubusercontent.com/u/1132799?v=4)](https://github.com/slawekp "slawekp (4 commits)")

---

Tags

apicoresenderemailmtasmtptransactional

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[mailgun/mailgun-php

The Mailgun SDK provides methods for all API functions.

1.1k30.8M181](/packages/mailgun-mailgun-php)[symfony/mailer

Helps sending emails

1.6k409.1M1.4k](/packages/symfony-mailer)[sylius/sylius

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

8.5k5.9M733](/packages/sylius-sylius)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[deeplcom/deepl-php

Official DeepL API Client Library

2607.3M110](/packages/deeplcom-deepl-php)

PHPackages © 2026

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