PHPackages                             notifiablehq/receive-email - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. notifiablehq/receive-email

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

notifiablehq/receive-email
==========================

Let your Laravel app receive emails.

0.15.2(1y ago)3183MITPHPPHP ^8.2

Since May 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/NotifiableHQ/receive-email)[ Packagist](https://packagist.org/packages/notifiablehq/receive-email)[ RSS](/packages/notifiablehq-receive-email/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (44)Used By (0)

Receive Email
=============

[](#receive-email)

Let your Laravel app receive emails.

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

[](#installation)

```
composer require notifiablehq/receive-email
```

Usage
-----

[](#usage)

### 1. Publish Config and Migrations

[](#1-publish-config-and-migrations)

Publish the configuration and migration files:

```
php artisan vendor:publish --provider="Notifiable\\ReceiveEmail\\ReceiveEmailServiceProvider" --tag=receive-email
```

Then run the migrations:

```
php artisan migrate
```

### 2. Listen for Incoming Emails

[](#2-listen-for-incoming-emails)

Whenever an email is received, the package will dispatch the `Notifiable\\ReceiveEmail\\Events\\EmailReceived` event. On Laravel 11 and above, you should use a listener class:

#### Create the Listener

[](#create-the-listener)

Generate a listener class:

```
php artisan make:listener HandleIncomingEmail
```

Then implement the `handle` method:

```
namespace App\Listeners;

use Notifiable\ReceiveEmail\Events\EmailReceived;

class HandleIncomingEmail
{
    public function handle(EmailReceived $event): void
    {
        $email = $event->email;

        \Log::info('Received email with subject: ' . $email->parsedMail()->subject());
    }
}
```

### 3. Accessing Email Data

[](#3-accessing-email-data)

The `Email` model gives you access to sender, recipients, subject, and body through the `parsedMail` method. Example:

```
/** @var \Notifiable\ReceiveEmail\Contracts\ParsedMailContract $mail */
$mail = $email->parsedMail();

$subject = $mail->subject();
$textBody = $mail->text();
$htmlBody = $mail->html();
$recipients = $mail->recipients();
```

Forge Deployment
----------------

[](#forge-deployment)

1. Add this to your recipes, you can name it `Install Mailparse`. Make sure the user is `root`.

```
apt-get update
apt-get install -y php-cli php-mailparse
```

2. If you already have an existing server, run this recipe on that server. Otherwise, create a new server and make sure to select this recipe as a `Post-Provision Recipe`. You'll have to show `Advance Settings` to select this.
3. Once you have the server ready, open up `Port 25`, add your site, and deploy your Laravel app.
4. SSH into your Forge server and go to your site directory. Then run the setup command as a `super user`:

```
sudo php artisan notifiable:setup-postfix domain-that-receives-email.com
```

5. Add the following DNS records to your domain:

    TypeHostValueAyour-application-domain.comyour.forge.ip.addressTypeHostValuePriorityMXdomain-that-receives-email.comyour-application-domain.com10

Research References
-------------------

[](#research-references)

- [How Postfix receives email](https://www.postfix.org/OVERVIEW.html#receiving)
- [Installing and configuring Postfix on Ubuntu](https://ubuntu.com/server/docs/install-and-configure-postfix)

Credits
-------

[](#credits)

The solutions in this package are inspired by the following projects:

- [Mailcare](https://gitlab.com/mailcare/mailcare)
- [Laravel Mailbox](https://github.com/beyondcode/laravel-mailbox)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance47

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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 ~8 days

Recently: every ~0 days

Total

43

Last Release

406d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4eff78899d39d79e9eaf65df18ae55e18ff4be026524d311fdb178f9f2f1d0df?d=identicon)[princejohnsantillan](/maintainers/princejohnsantillan)

---

Top Contributors

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

---

Tags

laravelmailboxinbound emailreceive email

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/notifiablehq-receive-email/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M686](/packages/barryvdh-laravel-ide-helper)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[xefi/faker-php-laravel

Faker php integration with laravel

1915.1k](/packages/xefi-faker-php-laravel)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

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