All Projects → egulias → Emailvalidator

egulias / Emailvalidator

Licence: mit
PHP Email address validator

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to Emailvalidator

Brazilian Utils
Utils library for specific Brazilian businesses
Stars: ✭ 1,023 (-90.24%)
Mutual labels:  validator, email
Ismailfine
A simple (but correct) library for validating email addresses. Supports mail addresses as defined in rfc5322 as well as the new Internationalized Mail Address standards (rfc653x). Based on https://github.com/jstedfast/EmailValidation
Stars: ✭ 9 (-99.91%)
Mutual labels:  validator, email
Rspamd
Rapid spam filtering system.
Stars: ✭ 1,392 (-86.72%)
Mutual labels:  email
Fuzzymail
📨 Email template generator. Making emails fun again.
Stars: ✭ 114 (-98.91%)
Mutual labels:  email
Yii2 Swiftmailer
Yii 2 swiftmailer extension.
Stars: ✭ 109 (-98.96%)
Mutual labels:  email
N1 Unsubscribe
Plugin for Nylas Mail that adds a quick unsubscribe button for email.
Stars: ✭ 105 (-99%)
Mutual labels:  email
Action Send Mail
⚙️ A GitHub Action to send an email to multiple recipients
Stars: ✭ 111 (-98.94%)
Mutual labels:  email
Cfrpki
Cloudflare's RPKI Toolbox
Stars: ✭ 104 (-99.01%)
Mutual labels:  validator
Ethereum Staking Guide
Ethereum 2.0 Staking Guides
Stars: ✭ 116 (-98.89%)
Mutual labels:  validator
Runbox7
Runbox 7 web app
Stars: ✭ 107 (-98.98%)
Mutual labels:  email
Cpf Cnpj Validator
Valida e formata strings de CPF ou CNPJ.
Stars: ✭ 113 (-98.92%)
Mutual labels:  validator
Polkadot Secure Validator
Polkadot Validator Secure Setup
Stars: ✭ 108 (-98.97%)
Mutual labels:  validator
Parsemail
Simple email parsing for Golang
Stars: ✭ 107 (-98.98%)
Mutual labels:  email
Bamboo smtp
An SMTP adapter for Bamboo.
Stars: ✭ 111 (-98.94%)
Mutual labels:  email
Django Notifs
Modular Notifications (InApp, Email, SMS, CustomBackend etc) for Django
Stars: ✭ 105 (-99%)
Mutual labels:  email
Premailex
Preflight for your HTML emails - inline styling and plain text.
Stars: ✭ 114 (-98.91%)
Mutual labels:  email
Spring Boot 2.x Examples
Spring Boot 2.x code examples
Stars: ✭ 104 (-99.01%)
Mutual labels:  email
Gin Web
由gin + gorm + jwt + casbin组合实现的RBAC权限管理脚手架Golang版, 搭建完成即可快速、高效投入业务开发
Stars: ✭ 107 (-98.98%)
Mutual labels:  validator
Email To Pdf Converter
Converts email files (eml, msg) to pdf
Stars: ✭ 110 (-98.95%)
Mutual labels:  email
Maoni Email
Callback for Maoni to send feedbacks via email. Relocated to https://github.com/maoni-app/maoni/tree/master/callbacks/maoni-email
Stars: ✭ 116 (-98.89%)
Mutual labels:  email

EmailValidator

Build Status Code Quality Test Coverage

A library for validating emails against several RFC.

Supported RFCs

This library aims to support RFCs:

Supported versions

Curent major version with full support is v3

Version Released EOL Only critical bug fixes Full
v3.x 2020/12/29 - X X
v2.1.x 2016/05/16 01/2022 X
v1.2 2013/19/05 YES

Requirements

Note: PHP version upgrades will happen to accomodate to the pace of major frameworks. Minor versions bumps will go via minor versions of this library (i.e: PHP7.3 -> v3.x+1). Major versions will go with major versions of the library

Installation

Run the command below to install via Composer

composer require egulias/email-validator

Getting Started

EmailValidatorrequires you to decide which (or combination of them) validation/s strategy/ies you'd like to follow for each validation.

A basic example with the RFC validation

<?php

use Egulias\EmailValidator\EmailValidator;
use Egulias\EmailValidator\Validation\RFCValidation;

$validator = new EmailValidator();
$validator->isValid("[email protected]", new RFCValidation()); //true

Available validations

  1. RFCValidation: Standard RFC-like email validation.
  2. NoRFCWarningsValidation: RFC-like validation that will fail when warnings* are found.
  3. DNSCheckValidation: Will check if there are DNS records that signal that the server accepts emails. This does not entails that the email exists.
  4. MultipleValidationWithAnd: It is a validation that operates over other validations performing a logical and (&&) over the result of each validation.
  5. MessageIDValidation: Follows RFC2822 for message-id to validate that field, that has some differences in the domain part.
  6. Your own validation: You can extend the library behaviour by implementing your own validations.

*warnings: Warnings are deviations from the RFC that in a broader interpretation are acceptded.

<?php

use Egulias\EmailValidator\EmailValidator;
use Egulias\EmailValidator\Validation\DNSCheckValidation;
use Egulias\EmailValidator\Validation\MultipleValidationWithAnd;
use Egulias\EmailValidator\Validation\RFCValidation;

$validator = new EmailValidator();
$multipleValidations = new MultipleValidationWithAnd([
    new RFCValidation(),
    new DNSCheckValidation()
]);
//ietf.org has MX records signaling a server with email capabilites
$validator->isValid("[email protected]", $multipleValidations); //true

Additional validations

Validations not present in the RFCs

  1. SpoofCheckValidation: Will check for multi-utf-8 chars that can signal an erroneous email name.

How to extend

It's easy! You just need to implement EmailValidation and you can use your own validation.

Contributing

Please follow the Contribution guide. Is short and simple and will help a lot.

Other Contributors

(You can find current contributors here)

As this is a port from another library and work, here are other people related to the previous one:

  • Ricard Clau @ricardclau: Performance against PHP built-in filter_var (v2 and earlier)
  • Josepf Bielawski @stloyd: For its first re-work of Dominic's lib
  • Dominic Sayers @dominicsayers: The original isemail function

License

Released under the MIT License attached with this code.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].