Download the PHP package plin-code/laravel-email-fixer without Composer

On this page you can find all versions of the php package plin-code/laravel-email-fixer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-email-fixer

Laravel Email Fixer

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Sanitize, normalize and auto-correct malformed email addresses in Laravel. Handles common typos from web forms, CSV imports, and mobile keyboards, including locale-specific issues like the Italian ò@ keyboard quirk.

The Problem

Users constantly submit broken email addresses. Typos, missing @ signs, incomplete domains, trailing dots, angle brackets from copy-paste, commas instead of dots. Every registration form, every CSV import, every contact form collects these. Most apps just reject them and lose the user.

Laravel Email Fixer automatically repairs these emails before validation, so your users don't bounce off your forms.

What It Fixes

Input Output Fixer
[email protected] [email protected] TrimWhitespace
<[email protected]> [email protected] StripAngleBrackets
user@gmail,com [email protected] CommaToDot
usergmail.com [email protected] InsertMissingAt
user@gmail [email protected] CompleteDomain
user@gmailcom [email protected] FixDomainSeparator
[email protected] [email protected] CleanLocalPart
[email protected]. [email protected] CleanTrailingDots
[email protected] [email protected] Lowercase
[email protected]§ [email protected] StripNonAsciiTrailing
userògmail.com [email protected] ItalianKeyboard (locale: it)

Installation

Optionally publish the config file:

Quick Start

Using the Facade

Using the Validation Rule

Apply the SanitizedEmail rule to auto-fix and validate email fields in one step. The fixed value is automatically merged back into the request.

With options:

Using the Middleware

Register the SanitizeEmails middleware to automatically fix all email fields in incoming requests before they reach your controllers.

By default, the middleware targets fields matching these patterns: email, *_email, email_*, *email*. You can customize this in the config file.

Use Cases

Registration and Login Forms

The most common scenario. Users mistype their email on signup, never receive the confirmation, and leave. With Email Fixer, most typos are silently corrected.

CSV/Bulk Import

When importing contacts or users from spreadsheets, email quality is often poor. Use fixMany() to clean them in bulk and diagnose() to flag the ones that could not be repaired.

Italian (or Locale-Specific) Users

Italian keyboards place the ò key right next to the @ key, causing a very common typo. Enable the Italian locale to handle this automatically, along with local domain shortcuts like liberolibero.it.

API Input Sanitization

Use the middleware on your API routes to transparently sanitize emails before any validation or processing takes place.

Auditing and Debugging

Use diagnose() to understand exactly what was changed and why, useful for logging or admin dashboards.

Configuration

The published config file (config/email-fixer.php) allows you to customize:

Custom Fixer Pipeline

You can define your own fixer order or add custom fixers:

Custom fixers must implement PlinCode\LaravelEmailFixer\Contracts\FixerInterface:

Standalone Usage

You can use Email Fixer outside of Laravel:

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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


All versions of laravel-email-fixer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^12.0||^13.0
illuminate/support Version ^12.0||^13.0
illuminate/validation Version ^12.0||^13.0
guzzlehttp/promises Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package plin-code/laravel-email-fixer contains the following files

Loading the files please wait ...