PHPackages                             loremipsum-systems/emailit - 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. loremipsum-systems/emailit

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

loremipsum-systems/emailit
==========================

SDK for Emailit API

0.1.2(1y ago)0596↓83.7%MITPHPPHP &gt;=8.1

Since Dec 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Lorem-Ipsum-Systems/EmailIt-SDK)[ Packagist](https://packagist.org/packages/loremipsum-systems/emailit)[ RSS](/packages/loremipsum-systems-emailit/feed)WikiDiscussions main Synced 2d ago

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

EmailItMailer Library
=====================

[](#emailitmailer-library)

The `EmailItMailer` library is a PHP wrapper for interacting with the **EmailIt API**, allowing you to send emails and manage sending domains effortlessly. Built on top of `GuzzleHttp`, this library aims to streamline the process of integrating email features into your project.

---

Features
--------

[](#features)

- Send emails with HTML, text, custom headers, and file attachments.
- Retrieve a list of sending domains with pagination and filtering.
- Fetch detailed information about a specific sending domain.

---

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Composer
- Required dependencies (managed via Composer):
    - `guzzlehttp/guzzle` (HTTP client)
    - `psr/http-client`, `psr/http-message`, `psr/http-factory`
    - `ralouphie/getallheaders`
    - `symfony/deprecation-contracts`

---

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

[](#installation)

Use Composer to install the library:

```
composer loremipsum-systems/emailit
```

---

Usage
-----

[](#usage)

### Initialization

[](#initialization)

First, create a new instance of `EmailItMailer` by providing your API key.

```
use LoremIpsum\EmailIt\EmailItMailer;

$apiKey = 'your-api-key';
$emailIt = new EmailItMailer($apiKey);
```

### Sending an Email

[](#sending-an-email)

To send an email, use the `send` method. This method supports the following parameters:

- `from`: Sender's email address.
- `to`: Recipient's email address.
- `subject`: Email subject.
- `htmlContent`: (Optional) HTML email content.
- `textContent`: (Optional) Plain text email content.
- `attachments`: (Optional) Array of file attachments.
- `headers`: (Optional) Array of custom headers.

Here’s an example:

```
try {
    $response = $emailIt->send(
        'sender@example.com', // Sender
        'recipient@example.com', // Recipient
        'Hello, World!', // Subject
        'This is a test email', // HTML Content
        'This is a test email', // Text Content
        [], // Attachments (optional)
        ['X-Custom-Header' => 'value'] // Custom Headers (optional)
    );
    print_r($response);
} catch (Exception $e) {
    echo 'Error: ' . $e->getMessage();
}
```

---

### Managing Sending Domains

[](#managing-sending-domains)

#### Get a List of Sending Domains

[](#get-a-list-of-sending-domains)

Retrieve a paginated list of all sending domains using the `getSendingDomains` method:

```
try {
    $domains = $emailIt->getSendingDomains(1, 10, 'example'); // Page 1, 10 results, search term "example"
    print_r($domains);
} catch (Exception $e) {
    echo 'Error: ' . $e->getMessage();
}
```

#### Fetch Details of a Sending Domain

[](#fetch-details-of-a-sending-domain)

To get detailed information about a specific sending domain, use the `getSendingDomain` method:

```
try {
    $domainDetails = $emailIt->getSendingDomain('domain-id');
    print_r($domainDetails);
} catch (Exception $e) {
    echo 'Error: ' . $e->getMessage();
}
```

---

Error Handling
--------------

[](#error-handling)

All methods in the `EmailItMailer` class throw standard PHP `Exception`s. Common reasons for exceptions include:

- Invalid API credentials.
- HTTP or network errors during API requests.
- Invalid input, such as malformed attachments.

Use `try...catch` blocks to handle exceptions gracefully, as shown in the examples above.

---

Contributing
------------

[](#contributing)

We welcome contributions to improve the library. Feel free to:

1. Fork the repository.
2. Submit a Pull Request (PR) with your improvements.
3. Ensure all code changes include tests and documentation updates (if applicable).

---

License
-------

[](#license)

This library is released under the MIT License. See the [LICENSE](LICENSE) file for details.

---

Support
-------

[](#support)

If you encounter any issues or need further assistance, please reach out at  or open a GitHub issue.

---

Acknowledgments
---------------

[](#acknowledgments)

This library leverages the following dependencies:

- [GuzzleHttp](https://github.com/guzzle/guzzle) for making HTTP requests.
- PSR request and response libraries for standardized HTTP message handling.

---

### Notes for Developers

[](#notes-for-developers)

- Ensure you have proper API documentation access while working with the API endpoints.
- Always validate attachments before sending email requests to avoid errors.

---

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance46

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~76 days

Total

3

Last Release

419d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae62caeaa6ff9595107f13b2d6ea2a514b3306463c70618de6168ed98b1770d1?d=identicon)[loremipsumsystems](/maintainers/loremipsumsystems)

---

Top Contributors

[![samuelbengtsson](https://avatars.githubusercontent.com/u/62132302?v=4)](https://github.com/samuelbengtsson "samuelbengtsson (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/loremipsum-systems-emailit/health.svg)

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[guanguans/notify

Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NotifyX、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

687114.3k8](/packages/guanguans-notify)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

254168.5k](/packages/erag-laravel-disposable-email)

PHPackages © 2026

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