Download the PHP package asamoahboateng/academic-email-verifier without Composer
On this page you can find all versions of the php package asamoahboateng/academic-email-verifier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download asamoahboateng/academic-email-verifier
More information about asamoahboateng/academic-email-verifier
Files in asamoahboateng/academic-email-verifier
Package academic-email-verifier
Short Description A PHP package to verify if an email address belongs to an academic or research institution. Live demo: https://verify-academic-email.asamoahboateng.com
License MIT
Informations about the package academic-email-verifier
Academic Email Verifier
A PHP package to verify if an email address belongs to an academic or research institution. This package helps you validate whether an email address is from a recognized academic institution.
Live Demo
Try the package live at: verify-academic-email.asamoahboateng.com
Installation
You can install the package via Composer:
Requirements
- PHP 8.2 or higher
- JSON extension
Usage
Basic Usage
Domain Exceptions
You can add custom domain exceptions for institutions that aren't in the main database:
Available Methods
verify(string $email): array
Verifies if an email belongs to an academic institution. Returns an array with:
is_academic
(boolean): Whether the email is from an academic institutionuniversity
(string|null): The name of the university if founderror
(string|null): Error message if verification fails
isValidEmail(string $email): bool
Checks if the email format is valid.
addDomainException(string $domain, string $institutionName): void
Adds a custom domain to be considered as academic.
removeDomainException(string $domain): void
Removes a previously added domain exception.
getDomainExceptions(): array
Returns all currently added domain exceptions.
clearDomainExceptions(): void
Removes all domain exceptions.
Example Results
Testing
Run the test suite using PHPUnit:
License
This package is open-sourced software licensed under the MIT license.
Author
- Kwame Boateng
- Email: [email protected]
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
All versions of academic-email-verifier with dependencies
ext-json Version *