定制 miovisman/normemail 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

miovisman/normemail

最新稳定版本:1.0.0

Composer 安装命令:

composer require miovisman/normemail

包简介

Normalization of email for bans, for request cache to SFS or for checking the uniqueness of new users.

README 文档

README

MIT licensed

Installation

composer require miovisman/normemail

normalize() method

$nEmail = new MioVisman\NormEmail\NormEmail();

$email = $nEmail->normalize($email);
  • Method does not validate email address

  • Do not use normalized email to send emails

  • Use a normalized email to check the ban or uniqueness of the email of a new user. Check on the normalized emails ;)
  • The domain is lowercase (and in Punycode)
  • The local part is lowercase unless otherwise specified
  • The local part after the "+" is truncated (for Yahoo domains - after the "-")
// some string
                                      =>
ExampLe                               => example
ExampLe@                              => example@
exaMple.COM                           => example.com
.example.com                          => .example.com
@examPLe.com                          => example.com
"examPLe.com                          => "example.com
"USER+++NAME@EXAMpLE.com              => "USER+++NAME@example.com
googlemail.com                        => gmail.com
pm.me                                 => protonmail.com
yandex.tj                             => yandex.ru
ya.ru                                 => yandex.ru
.ya.ru                                => .yandex.ru

// Unicode
ПОЛЬЗОВАТЕЛЬ@домен.РУ                 => пользователь@xn--d1acufc.xn--p1ag
пользователь+тег@домен.ру             => пользователь@xn--d1acufc.xn--p1ag

// Gmail
User.namE+tag@gmail.com               => username@gmail.com
u.sern.ame+tag+tag+tag@googlemail.com => username@gmail.com

// Protonmail
u_s.e-rname+tag@pm.me                 => username@protonmail.com
user-name@protonmail.ch               => username@protonmail.com

// Yahoo (.com, .ae, .at, ...)
username-tag@yahoo.com                => username@yahoo.com
user+name-tag@yahoo.fr                => user+name@yahoo.fr

// Yandex (13 domains)
user.name+tag@яндекс.рф               => user-name@yandex.ru
user-name@yandex.com                  => user-name@yandex.ru
username@ya.ru                        => username@yandex.ru

License

This project is under MIT license. Please see the license file for details.

统计信息

  • 总下载量: 40
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 3
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-12-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固