定制 apavliukov/laravel-email-smtp-validation 二次开发

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

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

apavliukov/laravel-email-smtp-validation

最新稳定版本:1.0.6

Composer 安装命令:

composer require apavliukov/laravel-email-smtp-validation

包简介

Validate email address via SMTP to check if it really exists

README 文档

README

Laravel package for simpler usage of zytzagoo/smtp-validate-email package to check if email really exists. It retrieves MX records for the email domain and then connects to the domain's SMTP server to try figuring out if the address really exists.

Installation

composer require apavliukov/laravel-email-smtp-validation

Usage

Config

You can copy config file

php artisan vendor:publish --tag=email-smtp-validation-config

If you want to disable SMTP check on some environments, you can pass them in config on key disable_on_env. By default, local env is disabled to allow you to use fake emails during development.

Rule

For example, in your request class you can use Rules\EmailSmtpVerified rule like here

use AlexPavliukov\EmailSmtpValidation\Rules\EmailSmtpVerified;
...

class ValidateEmailRequest extends FormRequest
{
    public function rules()
    {
        return [
            'email' => [
                'required',
                'email',
                app(EmailSmtpVerified::class),
            ],
        ];
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-07-13