🥳🔐 This package is a Laravel package that checks if an email address is a spammer

Overview

laravel-spam-email

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require Made in Nigeria

This package is a Laravel package that checks if an email address is a spammer. It verifies your signups and form submissions to confirm that they are legitimate.

Installation

You can install the package via composer:

composer require martian/spammailchecker
  • If you are using Laravel 5.5 or higher, you can use the package directly: composer require 'martian/spammailchecker'.
  • If you're using Laravel 5.4 or lower, you'll need to register the service provider. Open config/app.php and add the following line to the providers array:
Martian\SpamMailChecker\SpamMailCheckerServiceProvider::class,

Usage

Make use of spammail in your validation rules:

/**
 * Get a validator for an incoming registration request.
 *
 * @param  array  $data
 * @return \Illuminate\Contracts\Validation\Validator
 */
protected function validator(array $data)
{
    return Validator::make($data, [
        'email' => 'required|email|spammail|max:255',
    ]);
}

Or make use of spammail in your Requests file like this:

 /**
 * Get the validation rules that apply to the request.
 *
 * @return array
 */
public function rules()
{
    return [
        'email' => 'required|email|spammail|max:255',
    ];
}

Error message shown when the email is a spam: api screenshot error

By default, the error message is:

    "email": [
        "The email address is a spam address, please try another one."
    ]

You can customize the error message by opening resources/lang/en/validation.php and adding to the array like so:

  'spammail' => 'You are using a spam email address nerd :-P',

screen shot 2016-07-02 at 2 12 14 pm

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please feel free to fork this project and make a pull request. For more information check CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

How to appreciate the work

Here are some ways you can give back to the project:

License

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

You might also like...
Simple transactional email classes/templates for Laravel 5 mailables
Simple transactional email classes/templates for Laravel 5 mailables

Tuxedo Tuxedo is an easy way to send transactional emails with Laravel's Mail classes, with the templates already done for you. Contents Installation

 Laravel Disposable Email Validator
Laravel Disposable Email Validator

Laravel Disposable Email Validator Prevent users from registrering with a disposable email addresses! Table of Contents Installation Usage Translation

Laravel Email Audit Log

This service provider will monitor all emails that has been sent out of your system. Sent emails will be stored in email_audit_log table

User authentication REST API with Laravel (Register, Email verification, Login, Logout, Logged user data, Change password, Reset password)

User Authentication API with Laravel This project is a user authentication REST API application that I developed by using Laravel and MySql. Setup Fir

Email validation service in PHP

Email validation service Email validation service in PHP using Laravel 8. Validation features Domain Regular Expression Smtp Txt records Installing de

A bring-your-own-email-first newsletter service. ✨

Typewrite Typewrite a hosted bring-your-own-email newsletter service for people who need a simplistic and privacy-first newsletter service. The core a

Provides email verification on the go.

Email Checker Email Checker was created and maintained by Aman Nurani. It provides a powerful email validating system for both development and product

Email-flooder - A CLI flooder e-mail tool, made in PHP.
Email-flooder - A CLI flooder e-mail tool, made in PHP.

E-mail flooder (PHP 8.0.13) You can send emails to any server, however the request must come from Gmail. (Remember to enable less secure apps to be ab

List of 77 languages for Laravel Framework 4, 5, 6, 7 and 8, Laravel Jetstream , Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova and Laravel Spark.

Laravel Lang In this repository, you can find the lang files for the Laravel Framework 4/5/6/7/8, Laravel Jetstream , Laravel Fortify, Laravel Cashier

Comments
  • ⚠️ Valid Emails Returning Error

    ⚠️ Valid Emails Returning Error

    After major testing, some valid domains by Google Spam Detection mark some domains as valid

    This .txt file has to go through a major overhaul in order to fix this. (Can be a major issue for users' signups on apps in which "laravel-spam-mail" package was implemented)

    image For Context: The image above live.com and icloud.com domain are listed as spam which are not.
    opened by hendurhance 1
  • Issue with installation of your package

    Issue with installation of your package

    I got an error throw when installing your package. Below is the error:

    /d/Projects/google-tracking-app/$ composer require martian/spammailchecker
    Using version ^1.2 for martian/spammailchecker
    ./composer.json has been updated
    Running composer update martian/spammailchecker
    Loading composer repositories with package information
    Updating dependencies
    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Root composer.json requires martian/spammailchecker ^1.2 -> satisfiable by martian/spammailchecker[1.2].
        - martian/spammailchecker 1.2 requires illuminate/support ~7|~8.0 -> found illuminate/support[v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it confl
    icts with another require.
    
    You can also try re-running composer require with an explicit version constraint, e.g. "composer require martian/spammailchecker:*" to figure out if any version is installable, or "composer re
    quire martian/spammailchecker:^2.1" if you know which you need.
    
    Installation failed, reverting ./composer.json and ./composer.lock to their original content.
    

    How can it be fixed please? Thanks.

    opened by ljsharp 0
Releases(1.2)
Owner
Endurance, the Martian
Love developing and exploring awesome products with my bare hands 🥴. 🥑 Software Engineer & 💡Product Designer. 📦 Python, Vue js & Laravel.
Endurance, the Martian
EmailValidator - PHP Email address validator

EmailValidator A library for validating emails against several RFC. Supported RFCs This library aims to support RFCs: 5321, 5322, 6530, 6531, 6532, 10

Eduardo Gulias Davis 10.9k Jan 3, 2023
How to get cookies from users' browser and send the information to your email address and telegram bot

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

MAXWELL 3 Dec 3, 2022
Trigger email failures to assert what happens on your Laravel Application when an email fails to send

Laravel Email Failer composer require --dev rogervila/laravel-email-failer About Trigger email failures to assert what happens on your Laravel Applica

Roger Vilà 30 Jul 17, 2022
Fearless refactoring, it does a lot of smart checks to find certain errors.

Find Bugs Before They Bite Built with ❤️ for lazy laravel developers ;) Why repeat the old errors, if there are so many new errors to commit. (Bertran

Iman 1.2k Dec 29, 2022
In Laravel, we commonly face the problem of adding repetitive filtering code, this package will address this problem.

Filterable In Laravel, we commonly face the problem of adding repetitive filtering code, sorting and search as well this package will address this pro

Zoran Shefot Bogoevski 1 Jun 21, 2022
Simple address and contact management for Laravel with automatically geocoding to add longitude and latitude

Laravel Addresses Simple address and contact management for Laravel with automatically geocoding to add longitude and latitude. Installation Require t

Chantouch Sek 2 Apr 4, 2022
Laravel package for giving admin-created accounts to users via 'set-password' email.

Invytr When making a website where users are created instead of registering themselves, you are faced with the challenge of safely giving users the ac

GlaivePro 64 Jul 17, 2022
LERN is a Laravel package that will record exceptions into a database and will notify you via Email, Pushover or Slack.

LERN is a Laravel package that will record exceptions into a database and will notify you via Email, Pushover or Slack.

Tyler Arbon 437 Nov 17, 2022
A package to validate email domains in a user registration form

This package allows to define a subset of allowed email domains and validate any user registration form with a custom rule.

H-FARM 56 Jul 19, 2022
A package to validate email domains in a user registration form

Laravel Email Domain Rule This package allows to define a subset of allowed email domains and validate any user registration form with a custom rule.

H-FARM Innovation 56 Jul 19, 2022