{"id":16068002,"url":"https://github.com/mailboxvalidator/mailboxvalidatorlaravel","last_synced_at":"2025-03-18T05:31:03.287Z","repository":{"id":62522705,"uuid":"151536739","full_name":"MailboxValidator/MailboxValidatorLaravel","owner":"MailboxValidator","description":"MailboxValidator Laravel package enable users to block disposal email, detect free email and validate if an email is valid.","archived":false,"fork":false,"pushed_at":"2024-10-08T03:04:48.000Z","size":26,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-14T06:46:03.527Z","etag":null,"topics":["email-validation","email-validator","email-verification","email-verifier","laravel","laravel-framework","mailboxvalidator","mailboxvalidator-api"],"latest_commit_sha":null,"homepage":"https://www.mailboxvalidator.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MailboxValidator.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-04T07:49:11.000Z","updated_at":"2024-10-08T02:55:51.000Z","dependencies_parsed_at":"2024-10-27T17:39:14.339Z","dependency_job_id":null,"html_url":"https://github.com/MailboxValidator/MailboxValidatorLaravel","commit_stats":{"total_commits":33,"total_committers":2,"mean_commits":16.5,"dds":0.1515151515151515,"last_synced_commit":"c5150cbb4070c56007527f8c40e9ee2b82d90488"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MailboxValidator%2FMailboxValidatorLaravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MailboxValidator%2FMailboxValidatorLaravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MailboxValidator%2FMailboxValidatorLaravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MailboxValidator%2FMailboxValidatorLaravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MailboxValidator","download_url":"https://codeload.github.com/MailboxValidator/MailboxValidatorLaravel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244164812,"owners_count":20408990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email-validation","email-validator","email-verification","email-verifier","laravel","laravel-framework","mailboxvalidator","mailboxvalidator-api"],"created_at":"2024-10-09T06:07:45.251Z","updated_at":"2025-03-18T05:31:02.066Z","avatar_url":"https://github.com/MailboxValidator.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MailboxValidator Laravel Email Validation Package\r\n\r\nMailboxValidator Laravel Email Validation Package enables user to easily validate if an email address is a type of disposable email or not.\r\n\r\nThis module can be useful in many types of projects, for example\r\n\r\n - to validate an user's email during sign up\r\n - to clean your mailing list prior to email sending\r\n - to perform fraud check\r\n - and so on\r\n\r\n*Note: This extension works in Laravel 5, Laravel 6, Laravel 7, Laravel 8, Laravel 9, Laravel 10 and Laravel 11.*\r\n\r\n## Installation\r\n\r\nOpen the terminal, locate to your project root and run the following command :\r\n\r\n`composer require mailboxvalidator-laravel/validation`\r\n\r\n\r\n\r\nFor Laravel versions below 5.5, you might need the additional step to make Laravel \r\ndiscover the service provider. Open the `config/app.php` and add the \r\nservice provider manually into the providers section: \r\n\r\n``MailboxValidatorLaravel\\Validation\\ValidationServiceProvider::class,``\r\n\r\nIn the terminal, type the following command to publish the modified config file:\r\n\r\n``\r\nphp artisan vendor:publish --provider=MailboxValidatorLaravel\\Validation\\ValidationServiceProvider --force\r\n``\r\n\r\n\r\n\r\n## Dependencies\r\n\r\nAn API key is required for this module to function.\r\n\r\nGo to https://www.mailboxvalidator.com/plans#api to sign up for FREE API plan and you'll be given an API key.\r\n\r\nAfter that, please save your API key in your web application environement file like this:\r\n``\r\nMBV_API_KEY = 'PASTE_YOUR_API_KEY_HERE'\r\n``\r\n\r\n## Functions\r\n\r\n### GetValidateDisposable (email_address)\r\n\r\nCheck if the supplied email address is from a disposable email provider.\r\n\r\n#### Return Fields\r\n\r\n| Field Name        | Description                                                  |\r\n| ----------------- | ------------------------------------------------------------ |\r\n| email_address     | The input email address.                                     |\r\n| is_disposable     | Whether the email address is a temporary one from a disposable email provider. Return values: True, False |\r\n| credits_available | The number of credits left to perform validations.           |\r\n| error_code        | The error code if there is any error. See error table in the below section. |\r\n| error_message     | The error message if there is any error. See error table in the below section. |\r\n\r\n### ValidateDisposable\r\n\r\nCheck the email address from the form and validate it whether is a disposable email or not.\r\n\r\n## Usage\r\n\r\nTo use this package to validate the email coming from form submission, you will just need to include `'|disposable'`in Validator function in app\\Http\\Controllers\\Auth\\RegisterController.php . A step by step tutorial is included [here](https://www.mailboxvalidator.com/resources/articles/how-to-use-mailboxvalidator-laravel-email-validation-package-to-validate-email-during-registration/). \r\n\r\nTo print the validation result on single email, you will first need to include this line on top of your file: `use MailboxValidatorLaravel\\Validation\\ValidateEmail;` . Then, initialite the ValidateEmail class by using this line: `$validate = new ValidateEmail();`. Lastly, just call `$validate-\u003eGetValidateDisposable('email_tobe_validate','your_api_key');`  into a variable and print out the variable. For example, your controller file might be looks like this:\r\n\r\n```php\r\n\u003c?php\r\n\r\nnamespace App\\Http\\Controllers;\r\n\r\nuse Illuminate\\Http\\Request;\r\nuse MailboxValidatorLaravel\\Validation\\ValidateEmail;\r\n\r\nclass ViewValidateResultController extends Controller\r\n{\r\n\tpublic function print_result(){\r\n\t\t$validate = new ValidateEmail();\r\n\t\t$validate_result = $validate-\u003eGetValidateDisposable('email_tobe_validate','your_api_key');\r\n\t\tvar_dump($validate_result);\r\n\t}\r\n}\r\n\r\n\r\n```\r\n\r\n## Errors\r\n\r\n| error_code   | error_message         |\r\n| ----------   | --------------------- |\r\n| 10000        | Missing parameter.    |\r\n| 10001        | API key not found.    |\r\n| 10002        | API key disabled.     |\r\n| 10003        | API key expired.      |\r\n| 10004        | Insufficient credits. |\r\n| 10005        | Unknown error.        |\r\n| 10006        | Invalid email syntax. |\r\n\r\n\r\n\r\n## Copyright\r\n\r\nCopyright (C) 2018-2024 by MailboxValidator.com, support@mailboxvalidator.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailboxvalidator%2Fmailboxvalidatorlaravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmailboxvalidator%2Fmailboxvalidatorlaravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailboxvalidator%2Fmailboxvalidatorlaravel/lists"}