PHPackages                             paulbunyannet/form\_mail - 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. paulbunyannet/form\_mail

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

paulbunyannet/form\_mail
========================

Form to email helper

v2.0.2(4y ago)010.0k1PHPPHP &gt;=7.4

Since May 10Pushed 4y ago3 watchersCompare

[ Source](https://github.com/paulbunyannet/form_mail)[ Packagist](https://packagist.org/packages/paulbunyannet/form_mail)[ RSS](/packages/paulbunyannet-form-mail/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (6)Dependencies (16)Versions (38)Used By (0)

Depreciated, use Laravel's internal mail class instead.
=======================================================

[](#depreciated-use-laravels-internal-mail-class-instead)

Form Mail
=========

[](#form-mail)

A laravel package to capture submitted for fields and send out response to a recipient.

Setup
-----

[](#setup)

- Add providers to your config/app.php file:

```
    Pbc\FormMail\Providers\FormMailServiceProvider::class,
    Pbc\FormMailTemplate\Providers\FormMailTemplateServiceProvider::class,

```

- Run `php artisan vendor:publish` to get the config and database migration for this package.
- Run `php artisan migrate` to install the package table

Config
------

[](#config)

- `branding` string used for branding the email message
- `rules` extra form validation fields
- `queue` whether to queue this message or send out right away
- `confirmation` whether to send a confirmation message

Conventions
-----------

[](#conventions)

### Recipient

[](#recipient)

This package will use the current route for generating the email recipient of the message. For example, if there is a route is "contact-us" and the current site's `APP_URL` is "" then the recipient will be "".

### Fields

[](#fields)

By default the package requires three fields (in addition to CSRF):

- `name`, required
- `email`, required and valid email
- `fields`, required and must be an array. The fields list is used for labeling fields in the responces. The array should be formatted `['field_name'=>'Field Label']`. If no lable is found for a particular field, the field name will be used.

Any other required fields can be added to the `config/form_mail.php` config file.

As with language, you can add rules that are specific to a path by using the route name as the ley were the rules are located.

### Branding

[](#branding)

Add a graphic/html/whatever to the branding config item and it will be injected at the top of the email message. If branding is missing the branding will default to a language string `':domain :form Form'`.

### Messages

[](#messages)

To add a verbage (success message, what to do next, etc.) to the top of the message add a line to the `resources/lang/vendor/pbc_form_mail/en/body.php` using the route name and the the following keys:

- `recipient` used for email going to recipient
- `sender` used in both the return value from `Pbc\FormMail\Http\Controllers\FormMailController@requestHandler` and the confirmation message if option is turned on.

For example, if you had a route to `App\Http\Controllers\FormController@send` you would format your message array like:

```
'form' => [
        'send' => [
            'sender' => 'Thanks for filling out the :form form,  we will get back to you as soon as possible! This is a summary of the form you submitted. A copy of this form will be forwarded to :recipient.',
            'recipient' => 'A new response from the :form was submitted at :time from :domain.',
            'subject' => [
                'sender' => 'Your form message has been received!',
                'recipient' => 'A new form submission created on :url',
            ]
        ]

```

### Custom Subject Line

[](#custom-subject-line)

There is a helper that will auto create a subject for the message. If you want a custom one add a array key `subject` with keys `sender` and `recipient` like the above example.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~51 days

Recently: every ~60 days

Total

37

Last Release

1820d ago

Major Versions

v1.7.0 → v2.0.02020-12-09

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10351920?v=4)[Paul Bunyan Communications](/maintainers/paulbunyannet)[@paulbunyannet](https://github.com/paulbunyannet)

---

Top Contributors

[![natenolting](https://avatars.githubusercontent.com/u/8352600?v=4)](https://github.com/natenolting "natenolting (66 commits)")[![romanmartushev](https://avatars.githubusercontent.com/u/26902469?v=4)](https://github.com/romanmartushev "romanmartushev (13 commits)")[![paulbunyannet](https://avatars.githubusercontent.com/u/10351920?v=4)](https://github.com/paulbunyannet "paulbunyannet (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/paulbunyannet-form-mail/health.svg)

```
[![Health](https://phpackages.com/badges/paulbunyannet-form-mail/health.svg)](https://phpackages.com/packages/paulbunyannet-form-mail)
```

###  Alternatives

[blair2004/nexopos

The Free Modern Point Of Sale System build with Laravel, TailwindCSS and Vue.js.

1.2k2.3k](/packages/blair2004-nexopos)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[backpack/basset

Dead-simple way to load CSS or JS assets only once per page, when using Laravel 10+.

202832.4k6](/packages/backpack-basset)[firefly-iii/data-importer

Firefly III Data Import Tool.

7545.8k](/packages/firefly-iii-data-importer)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

97139.6k2](/packages/nickurt-laravel-akismet)

PHPackages © 2026

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