PHPackages                             thtg88/laravel-contact-request - 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. thtg88/laravel-contact-request

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

thtg88/laravel-contact-request
==============================

A package to send a contact request email.

v0.20.0(3mo ago)0142MITPHPPHP ^8.2CI failing

Since May 3Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/thtg88/laravel-contact-request)[ Packagist](https://packagist.org/packages/thtg88/laravel-contact-request)[ RSS](/packages/thtg88-laravel-contact-request/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (8)Versions (33)Used By (0)

Laravel Contact Request
=======================

[](#laravel-contact-request)

Send an email from your contact form.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
    - [Route](#route)
    - [Validation](#validation)
    - [Captcha](#captcha)
    - [Mail](#mail)
        - [Deliver Later](#deliver-later)
        - [Internal Recipient](#internal-recipient)
        - [Additional Options](#additional-options)
- [License](#license)
- [Security Vulnerabilities](#security-vulnerabilities)

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

[](#installation)

```
composer require thtg88/laravel-contact-request
```

You can publish the configuration file and views by running:

```
php artisan vendor:publish --provider="Thtg88\ContactRequest\ContactRequestServiceProvider"
```

Usage
-----

[](#usage)

Laravel Contact Request exposes a route to send an email from given data.

### Route

[](#route)

The route is available at `POST /contact-requests`.

You can customise the route by adding a prefix to the default one. This can be achieved by adding a `CONTACT_REQUEST_ROUTE_PREFIX` variable to your `.env` file, for example:

```
CONTACT_REQUEST_ROUTE_PREFIX="api/v1"

```

### Validation

[](#validation)

The data is validated by the [`SubmitContactRequestRequest`](src/Http/Requests/SubmitContactRequestRequest) class.

The validation rules are the following:

```
'email' => 'required|string|email|max:255',
'message' => 'required|string|max:4000',
'name' => 'required|string|max:255',
'phone' => 'required|string|max:255',

```

You can override those validation rules by publishing the Laravel Contact Request config file and applying yours:

```
php artisan vendor:publish --provider="Thtg88\ContactRequest\ContactRequestServiceProvider" --tag="contact-request-config"
```

### Captcha

[](#captcha)

Laravel Contact Request supports Google ReCaptcha V2. This must be sent in a variable called `g_recaptcha_response` or `g-recaptcha-response` in the request payload.

You can enable ReCaptcha V2 support by adding the following to your `.env` variable:

```
CONTACT_REQUEST_RECAPTCHA_MODE=true
NOCAPTCHA_SECRET=YourReCaptchaSecretKey
NOCAPTCHA_SITEKEY=YourRecaptchaSiteKey

```

### Mail

[](#mail)

Laravel Contact Request will send an email confirmation of the contact request to the email provided in the request, and one to an internal recipient of your choice.

Laravel Contact Request relies on the default Laravel mailer. Make sure you configure your email provider in your `.env` files. See the [Laravel docs](https://laravel.com/docs/7.x/mail) for guidance.

The validated data will be included in both emails.

#### Deliver Later

[](#deliver-later)

Laravel Contact Request supports placing email delivery on a queue for immediate delivery.

To configure it, in your `.env` file, simply set:

```
CONTACT_REQUEST_MAIL_DELIVER_LATER=true

```

This will leverage the `queue` method of the `Illuminate\Mail\Mailable` class, together with the default configured queue driver.

For more information see the [Laravel official docs](https://laravel.com/docs/7.x/mail#queueing-mail)

#### Internal Recipient

[](#internal-recipient)

You can customise the internal recipient by adding a variable to your `.env` file:

```
CONTACT_REQUEST_MAIL_INTERNAL_NOTIFICATION_ADDRESS=mail@example.com

```

#### Additional Options

[](#additional-options)

You can also customise the following:

- **Email subject for internal recipient**: `CONTACT_REQUEST_MAIL_INTERNAL_SUBJECT="Contact Request Internal Subject"`
- **Email subject for confirmation email (to the recipient specified in the request)**: `CONTACT_REQUEST_MAIL_SUBJECT="Contact Request Receipt"`
- **Signature of the email confirmation**: `CONTACT_REQUEST_MAIL_SIGNATURE_NAME="John Doe"`

The mail views are a simple HTML, but you can customise those as well by specifying a view name that's available in your project, similarly to how you return views in controllers e.g. `'view.name'`.

- **Main email HTML layout view name**: `CONTACT_REQUEST_MAIL_VIEWS_LAYOUT=layouts.email`
- **Internal notification HTML view name**: `CONTACT_REQUEST_MAIL_VIEWS_REQUESTED_INTERNAL=emails.contact.internal`
- **Internal notification plain view name**: `CONTACT_REQUEST_MAIL_VIEWS_REQUESTED_INTERNAL_PLAIN=emails.contact.internal_plain`
- **Notification to recipient provided in request - HTML view name**: `CONTACT_REQUEST_MAIL_VIEWS_REQUESTED=emails.contact.requested`
- **Notification to recipient provided in request - plain view name**: `CONTACT_REQUEST_MAIL_VIEWS_REQUESTED=emails.contact.requested_plain`

**More customisation options coming soon!**

License
-------

[](#license)

Laravel Contact Request is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover a security vulnerability within Laravel Contact Request, please send an e-mail to Marco Marassi at . All security vulnerabilities will be promptly addressed.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance85

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 92.1% 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 ~77 days

Recently: every ~346 days

Total

28

Last Release

112d ago

PHP version history (2 changes)v0.14.0PHP ^7.3|^8.0

v0.17.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16927402?v=4)[Marco Marassi](/maintainers/thtg88)[@thtg88](https://github.com/thtg88)

---

Top Contributors

[![thtg88](https://avatars.githubusercontent.com/u/16927402?v=4)](https://github.com/thtg88 "thtg88 (116 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (2 commits)")

---

Tags

contact-formlaravelmailphprest-api

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/thtg88-laravel-contact-request/health.svg)

```
[![Health](https://phpackages.com/badges/thtg88-laravel-contact-request/health.svg)](https://phpackages.com/packages/thtg88-laravel-contact-request)
```

###  Alternatives

[spatie/laravel-failed-job-monitor

Get notified when a queued job fails

1.0k2.6M4](/packages/spatie-laravel-failed-job-monitor)[vemcogroup/laravel-sparkpost-driver

SparkPost driver to use with Laravel 6.x|7.x|8.x|9.x|10.x

421.7M1](/packages/vemcogroup-laravel-sparkpost-driver)[spatie/mailcoach

Self-host Mailcoach

4007.0k](/packages/spatie-mailcoach)[synergitech/laravel-postal

This library integrates Postal with the standard Laravel mail framework.

38107.1k](/packages/synergitech-laravel-postal)[motomedialab/smtp2go

Send emails via API using the first-class email courier SMTP2Go

1316.3k](/packages/motomedialab-smtp2go)

PHPackages © 2026

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