{"id":22300410,"url":"https://github.com/mailboxvalidator/mailboxvalidator-cakephp","last_synced_at":"2025-07-29T02:31:47.765Z","repository":{"id":62522691,"uuid":"158803934","full_name":"MailboxValidator/mailboxvalidator-cakephp","owner":"MailboxValidator","description":"MailboxValidator CakePHP 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-09T08:57:13.000Z","size":13,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-11T22:22:43.625Z","etag":null,"topics":["cake-plugin","cakephp","cakephp-plugin","email-validation","email-validator","email-verification","email-verifier","mailboxvalidator-api","mailboxvalidator-cakephp"],"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}},"created_at":"2018-11-23T08:38:07.000Z","updated_at":"2024-10-09T08:56:20.000Z","dependencies_parsed_at":"2024-01-02T03:31:18.069Z","dependency_job_id":"9134efc5-f1d0-4524-90ae-7c8ebe896efd","html_url":"https://github.com/MailboxValidator/mailboxvalidator-cakephp","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MailboxValidator%2Fmailboxvalidator-cakephp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MailboxValidator%2Fmailboxvalidator-cakephp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MailboxValidator%2Fmailboxvalidator-cakephp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MailboxValidator%2Fmailboxvalidator-cakephp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MailboxValidator","download_url":"https://codeload.github.com/MailboxValidator/mailboxvalidator-cakephp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227971950,"owners_count":17849421,"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":["cake-plugin","cakephp","cakephp-plugin","email-validation","email-validator","email-verification","email-verifier","mailboxvalidator-api","mailboxvalidator-cakephp"],"created_at":"2024-12-03T18:10:51.332Z","updated_at":"2024-12-03T18:10:51.859Z","avatar_url":"https://github.com/MailboxValidator.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MailboxValidator CakePHP Email Validation Package\n\nMailboxValidator CakePHP Email Validation Package  enables user to easily validate if an email address is valid, a type of disposable email or free email.\n\nThis package can be useful in many types of projects, for example\n\n - to validate an user's email during sign up\n - to clean your mailing list prior to email sending\n - to perform fraud check\n - and so on\n\n\n\n## Installation\n\nOpen the terminal, locate to your project root and run the following command :\n\n`composer require mailboxvalidator/mailboxvalidator-cakephp`\n\n\nIf you want to manually install this plugin, firstly clone the plugin folder to the plugins folder under your website project. After that, add the following line into your project's composer.json file like this:\n\n```json\n{\n    ....\n    \"autoload\": {\n        \"psr-4\": {\n            ....\n            \"MailboxValidatorCakePHP\\\\\": \"plugins/mailboxvalidator-cakephp/src/\"\n        }\n    },\n}\n```\n\nRemember to run this command to autoload our plugin:\n\n```bash\ncomposer dumpautoload\n```\n\n\n\n## Dependencies\n\nAn API key is required for this module to function.\n\nGo to https://www.mailboxvalidator.com/plans#api to sign up for FREE API plan and you'll be given an API key.\n\nAfter you get your API key, open your config/bootstrap.php and add the following line:\n```php\nConfigure::write('MBV_API_KEY','PASTE_YOUR_API_KEY_HERE');\n```\n\n\n\nFunctions\n---------\n\n### single (email_address)\n\nPerforms email validation on the supplied email address.\n\n### disposable (email_address)\n\nCheck if the supplied email address is from a disposable email provider.\n\n### free (email_address)\n\nCheck if the supplied email address is from a free email provider.\n\n\n\n## Usage\n\nInclude this line in any form controller that handle validation:\n\n```php\nuse MailboxValidatorCakePHP\\Controller\\MailboxValidatorController;\n```\n\nIn any form validation method, before the $validator declare this line:\n\n```php\n$MBV = new MailboxValidatorController();\n```\n\nAdd the below line right after the $validator:\n\n```php\n-\u003esetProvider('mbv', $MBV)\n```\n\nAfter that, add a new rule to your form field. For example, if you want to validate the disposable email, your rule will be like this:\n\n```php\n-\u003eadd('email', 'disposable', [\n        'rule' =\u003e 'disposable',\n        'provider' =\u003e 'mbv',\n        'message' =\u003e 'Invalid email address. Please enter a non-disposable email address.',\n])\n```\n\nThe validators available to validate the email are: single, free and disposable. Each validator validate the email by using MailboxValidator API. For more information, you can visit [Single Validation API](https://www.mailboxvalidator.com/api-single-validation), [Disposable Email API](https://www.mailboxvalidator.com/api-email-disposable) and [Free Email API](https://www.mailboxvalidator.com/api-email-free). \n\n\n\n## Errors\n\n| error_code | error_message         |\n| ---------- | --------------------- |\n| 10000        | Missing parameter.    |\n| 10001        | API key not found.    |\n| 10002        | API key disabled.     |\n| 10003        | API key expired.      |\n| 10004        | Insufficient credits. |\n| 10005        | Unknown error.        |\n\n\n\n## Copyright\n\nCopyright (C) 2018-2024 by MailboxValidator.com, support@mailboxvalidator.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailboxvalidator%2Fmailboxvalidator-cakephp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmailboxvalidator%2Fmailboxvalidator-cakephp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailboxvalidator%2Fmailboxvalidator-cakephp/lists"}