PHPackages                             satis/incomingmail - 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. satis/incomingmail

ActiveLibrary

satis/incomingmail
==================

Saving claim by mail box

v3.3.0(4y ago)0117MITPHP

Since Jul 27Pushed 4y agoCompare

[ Source](https://github.com/dmdsarl/satis-incoming-mail)[ Packagist](https://packagist.org/packages/satis/incomingmail)[ RSS](/packages/satis-incomingmail/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)DependenciesVersions (7)Used By (0)

Satis Incoming Mail
===================

[](#satis-incoming-mail)

### Installation

[](#installation)

```
composer require satis/incomingmail
```

### Publish the package

[](#publish-the-package)

```
php artisan vendor:publish --provider="Satis\Incomingmail\IncomingmailServiceProvider"
```

Once published, you will have access to a controller **IncomingMail/IncomingMailController.php** which allows you to customize the mail registration function. Also a config is generated in **config/incoming\_mail.php**.

### Project configuration

[](#project-configuration)

Access the configuration in config/incoming\_mail.php to make your changes.

```
[
    "table" => "my_table", // Represents the name of the table in which you want to save the different received mails
    "message_format" => "html_text", // The format in which you want to save the messages received from the mail :
    // html_text => to save the message in html format and plain_text for plain text
    "object" => [ // The different fields that will be taken into account to record in the table
        "first_name" => "first_name", // Customize the name of the first name field of the sender
        "last_name" => "last_name", // Customize the name of the sender "s name field
        "email" => "email", // Customize the name of the email field
        "message" => "message", // Customize the field name of the message to be saved
        "date" => "date", // Customize the field name of the date the mail was sent
        "attachments" => "attachments", // Customize the name of the file field, this field is of type json
    ],
    "app_registration" => [ //Incoming mail service subscription information
        "app_name" => 'Care - Rwanda', // Name of your application,
        "url" => 'http://localhost:8000/api/incoming/mail', // Registration link for incoming mail
        "mail_server" => 'smtp.gmail.com', // Mail host
        "mail_server_username" => 'test@gmail.com', // Mail username
        "mail_server_password" => '****', // Mail password
        "mail_server_port" => '587', // Mail port
        "app_login_url" => 'http://localhost:8000/api/auth', // Api authentication
        "app_login_params" => [ // Information to connect to your project. The different colunms to change following
            // arguments needed to connect to your project
            "grant_type" => "password",
            "client_id" => "*****************",
            "client_secret" => "*****************************",
            "username" => "user@example.com",
            "password" => "******"
        ],
    ]
;
```

> For app\_login\_params you can for example use :

```
'app_login_params' => [
            "email" => "incoming-mail-care@dmdconsult.com",
            "password" => "123456"
        ];
```

if these are the fields you need for the connection to your project

### Subscription to the incoming mails service

[](#subscription-to-the-incoming-mails-service)

After the configuration, perform the subscription to the incoming mails service with the following command:

```
php artisan incomingmailregistration:install
```

From this moment your project receives unread mails every 1 minute and records them in your database

### GeneralMail or ClaimMail

[](#generalmail-or-claimmail)

You have the possibility to save the mails in a classic table **(GeneralMail)** or to do it as a claim **(ClaimMail)**

##### GeneralMail

[](#generalmail)

By default your project is configured to save mail in a classic table that you have defined in the **config/incoming\_mail.php** file. You can override this function by adding other attributes

```
   use GeneralMail{
       register as registerMail;
   }

   public function register(Request $request){
       $addData = [
           "request_channel_slug"=>"email",
           "response_channel_slug"=>"email",
       ];
       return $this->registerMail($request,$addData);
   }
```

or change the logic of the code :

```
    use GeneralMail{
        register as registerMail;
    }

    public function register(Request $request){

        // Your logic here

    }
```

##### ClaimMail

[](#claimmail)

To use the register as claim, please comment out the **Use GeneralMail**line and uncomment the **Use ClaimMail** line. The registration of mail in the form of claim is done the table definite in the config as the GeneralMail with the difference that in this case you must have a table **identities** that will contain the information of a claimer (You must have the attributes related to the following config: **'first\_name' , 'last\_name' , 'email'** ) and a table **files** for the registration of attachments with new fields (**title, url, attachmentable\_id, attachmentable\_type** )

```
	use ClaimMail{
        register as registerClaim;
    }

    public function register(Request $request){
        $addData = [
            "request_channel_slug"=>"email",
            "response_channel_slug"=>"email",
        ];
        return $this->registerClaim($request,$addData);
    }
```

or change the logic of the code

```
 use ClaimMail{
        register as registerClaim;
    }

    public function register(Request $request){

        // Your logic here

    }
```

### API URL

[](#api-url)

Add this link in your api route

```
use App\Http\Controllers\IncomingMail\IncomingMailController;
Route::post('satis/incoming/mail', [IncomingMailController::class, 'register']);
```

### API subscribe link for incoming mail service

[](#api-subscribe-link-for-incoming-mail-service)

Put env api link subscribe mail with this variable

```
INCOMING_MAIL_SERVICE_SUBSCRIBE
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

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

Total

6

Last Release

1701d ago

Major Versions

v2.1.0 → v3.0.02021-08-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec2e1312cf1e2f542496482b72e84722be8dc3838360374f79f534f3f9625582?d=identicon)[ulrich-dmd](/maintainers/ulrich-dmd)

---

Top Contributors

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

### Embed Badge

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

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

PHPackages © 2026

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