PHPackages                             zemailme/zemail-laravel - 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. zemailme/zemail-laravel

ActiveLibrary

zemailme/zemail-laravel
=======================

The official Zemail Laravel SDK

v1.1.0(yesterday)01↑2900%MITPHPPHP ^8.2CI passing

Since Aug 16Pushed yesterdayCompare

[ Source](https://github.com/zemailme/zemail-laravel)[ Packagist](https://packagist.org/packages/zemailme/zemail-laravel)[ RSS](/packages/zemailme-zemail-laravel/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Zemail Laravel SDK
==================

[](#zemail-laravel-sdk)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ed0b2ed77fd8186c318129c0860c798583256f7f13e9f06a510dfa4ee8cf0041/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a656d61696c6d652f7a656d61696c2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zemailme/zemail-laravel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/9fcb0c2e594ca02d67503d6d64744405a1b463d178152ac1308e0457d4d0aa28/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7a656d61696c6d652f7a656d61696c2d6c61726176656c2f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/zemailme/zemail-laravel/actions?query=workflow%3Arun-tests+branch%3Amain)[![PHP Version](https://camo.githubusercontent.com/bbe0b8da2fe5ac043e46bbd5a2a41339a4bbd0c17a574256b377857777b0f955/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7a656d61696c6d652f7a656d61696c2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zemailme/zemail-laravel)[![License](https://camo.githubusercontent.com/af97de4b0ab8251ccee7a9087bf5d954d280315a82b9bbfa21cc4bd2b2b0ef0e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7a656d61696c6d652f7a656d61696c2d6c61726176656c3f7374796c653d666c61742d737175617265)](https://github.com/zemailme/zemail-laravel/blob/main/LICENSE)

The official Laravel wrapper for the [Zemail API](https://zemail.me). Generate disposable, temporary emails, fetch messages, and manage your account seamlessly from within your Laravel applications.

---

📦 Installation
--------------

[](#-installation)

You can install the package via composer:

```
composer require zemailme/zemail-laravel
```

⚙️ Configuration
----------------

[](#️-configuration)

Publish the configuration file with:

```
php artisan vendor:publish --tag="zemail-config"
```

This will create a `config/zemail.php` file in your app. Add your API key to your `.env` file:

```
ZEMAIL_API_KEY=your_api_key_here
```

🚀 Usage
-------

[](#-usage)

You can access the API fluently using the `Zemail` Facade.

### 1. Account &amp; Subscription

[](#1-account--subscription)

Access your account profile, active plan, and API/mailbox usage limits:

```
use Zemail\Laravel\Zemail;

// Get account profile
$account = Zemail::account()->get();
echo "Account ID: {$account->id}, Email: {$account->email}, Tier: {$account->tier}\n";

// Get active subscription
$subscription = Zemail::account()->subscription();
echo "Status: {$subscription->status}, Tier: {$subscription->tier}\n";

// Get current resource & API usage
$usage = Zemail::account()->usage();
print_r($usage->mailboxes);
print_r($usage->storage);
print_r($usage->developerApi);
```

---

### 2. Domains

[](#2-domains)

List available domains for mailbox creation:

```
$domains = Zemail::domains()->list();

foreach ($domains->data as $domain) {
    echo "Domain: {$domain->name} (Types: " . implode(', ', $domain->allowedTypes) . ")\n";
}
```

---

### 3. Mailboxes

[](#3-mailboxes)

#### List Mailboxes

[](#list-mailboxes)

```
$mailboxes = Zemail::mailboxes()->list(page: 1, limit: 10);

foreach ($mailboxes->data as $mailbox) {
    echo "Mailbox: {$mailbox->address} (ID: {$mailbox->id})\n";
}

if ($mailboxes->hasMore) {
    echo "Next cursor: {$mailboxes->nextCursor}\n";
}
```

#### Create a Random Mailbox

[](#create-a-random-mailbox)

```
$mailbox = Zemail::mailboxes()->create([
    'type' => 'random',
]);

echo "Created random mailbox: {$mailbox->address}\n";
```

#### Create a Custom Mailbox

[](#create-a-custom-mailbox)

```
$mailbox = Zemail::mailboxes()->create([
    'type' => 'custom',
    'domain' => 'zemail.me',
    'username' => 'my-inbox',
]);

echo "Created custom mailbox: {$mailbox->address}\n";
```

#### Get Mailbox Details

[](#get-mailbox-details)

```
$mailbox = Zemail::mailboxes()->get(123);
echo "Address: {$mailbox->address}, Unread emails: {$mailbox->unreadCount}\n";
```

#### Delete a Mailbox

[](#delete-a-mailbox)

```
$deleted = Zemail::mailboxes()->delete(123);
// Returns true on success
```

---

### 4. Emails &amp; Attachments

[](#4-emails--attachments)

#### List Emails in a Mailbox

[](#list-emails-in-a-mailbox)

```
// List recent emails with optional search query
$emails = Zemail::mailboxes()->emails()->list(
    mailboxId: $mailbox->id,
    page: 1,
    limit: 25,
    search: 'verification'
);

foreach ($emails->data as $email) {
    echo "[{$email->id}] From: {$email->sender} | Subject: {$email->subject}\n";
}
```

#### Get Full Email Details

[](#get-full-email-details)

```
$email = Zemail::mailboxes()->emails()->get($mailbox->id, $emailId);

echo "Subject: {$email->subject}\n";
echo "Plain text body: {$email->bodyText}\n";
echo "HTML body: {$email->bodyHtml}\n";

// Inspect attachments
foreach ($email->attachments as $attachment) {
    echo "Attachment: {$attachment->name} ({$attachment->size} bytes)\n";
}
```

#### Mark Email as Read

[](#mark-email-as-read)

```
$isRead = Zemail::mailboxes()->emails()->markAsRead($mailbox->id, $emailId);
```

#### Get Temporary Attachment Download URL

[](#get-temporary-attachment-download-url)

```
$download = Zemail::mailboxes()->emails()->getAttachmentDownloadUrl(
    mailboxId: $mailbox->id,
    emailId: $emailId,
    attachmentId: 'att_123'
);

echo "Download URL: {$download['url']}\n";
echo "Expires at: {$download['expires_at']}\n";
```

#### Delete an Email

[](#delete-an-email)

```
$deleted = Zemail::mailboxes()->emails()->delete($mailbox->id, $emailId);
// Returns true on success
```

> **Note:** This package is a lightweight wrapper around the core [`zemail-php` SDK](https://github.com/zemailme/zemail-php). All methods, error handling, and models available in the core SDK are automatically available here via the Facade!

🧪 Testing
---------

[](#-testing)

```
composer test
```

🤝 Contributing
--------------

[](#-contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

🔒 Security
----------

[](#-security)

If you discover any security related issues, please email  instead of using the issue tracker.

📄 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/22aa68adfce3247546f94e98803f0786bf717b21780eebe651479b5d05cf00af?d=identicon)[zemailme](/maintainers/zemailme)

---

Top Contributors

[![idevakk](https://avatars.githubusercontent.com/u/219866223?v=4)](https://github.com/idevakk "idevakk (8 commits)")[![zemailme](https://avatars.githubusercontent.com/u/317541568?v=4)](https://github.com/zemailme "zemailme (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zemailme-zemail-laravel/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)

PHPackages © 2026

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