PHPackages                             rr/api-mailer - 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. rr/api-mailer

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

rr/api-mailer
=============

API Service Mailer, which allows PHP applications to send emails through API.

1.0.1(4y ago)010MITPHPPHP ^7.3|^8.0

Since Jul 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ramyrabi3/api-mailer)[ Packagist](https://packagist.org/packages/rr/api-mailer)[ RSS](/packages/rr-api-mailer/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

API Mailer
==========

[](#api-mailer)

API Service Mailer, which allows PHP applications to send emails through API.

Choose between the below list which API mail service you want to use. It reads the configuration from `environment` using `getenv`.

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

[](#installation)

```
composer require rr/api-mailer
```

##### [Sendgrid](https://sendgrid.com/)

[](#sendgrid)

```
# add Sendgird token to the environment
SENDGRID_API_KEY=[Sendgrid API Token]
```

##### [Mailjet](https://www.mailjet.com/)

[](#mailjet)

```
# add Mailjet tokens to the environment.
# Mailjet API version used is v3.1
MJ_APIKEY_PUBLIC=[Mailjet API Public Key]
MJ_APIKEY_PRIVATE=[Mailjet API Secret Key]
```

Usage
-----

[](#usage)

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

$mailer = \RR\ApiMailer\ApiMailer::getMailerInstance('sendgrid'); // sendgrid | mailjet
$message = new \RR\ApiMailer\Message(
    'this is subject', // subject
    'from@gmail.com', // from
    ['to@gmail.com'], // array of recipients
    'this is text', // plain text email body
    'this is HTML content' // HTML email body
);

$result = $mailer->send($message);

if ($result === true) {
    echo 'Successfully sent';
} else { // Error
    var_dump($mailer->getError());
}
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.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 ~0 days

Total

2

Last Release

1764d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f71af82b6d3e5ddd37b7b3afeb527306079918e61e9a5f6ea0a98cc84038a6e?d=identicon)[ramyrabi3](/maintainers/ramyrabi3)

---

Top Contributors

[![ramyrabi3](https://avatars.githubusercontent.com/u/1336373?v=4)](https://github.com/ramyrabi3 "ramyrabi3 (6 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

api-mailermailjetmailjet-apipackagephpsendgrid-apisendgrid-mailsengrid

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rr-api-mailer/health.svg)

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

###  Alternatives

[swiftmade/laravel-sendgrid-notification-channel

Laravel Notification Channel for Sengrid.com

26287.7k](/packages/swiftmade-laravel-sendgrid-notification-channel)[mailjet/mailjet-swiftmailer

A SwiftMailer transport implementation for Mailjet

261.2M9](/packages/mailjet-mailjet-swiftmailer)[iandenh/cakephp-sendgrid

SendgridEmail plugin for CakePHP

16123.4k](/packages/iandenh-cakephp-sendgrid)[bryglen/yii2-sendgrid

Sendgrid Mailer for Yii 2

1353.5k](/packages/bryglen-yii2-sendgrid)

PHPackages © 2026

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