wsw / email
Value Object E-mail
Installs: 16 666
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.6
Requires (Dev)
- fzaninotto/faker: ^1.6
- phpunit/phpunit: ^5.7
- rdehnhardt/var-dumper: ^1.1
- sebastian/phpcpd: ^3.0
- squizlabs/php_codesniffer: ^3.0
This package is auto-updated.
Last update: 2024-10-29 04:36:46 UTC
README
Value object for handling email-type values
Installation
Via Composer:
composer require wsw/email
Usage
<?php use WSW\Email\Email; try { $email = new Email('ronaldo@whera.com.br'); echo $email->getEmail(); // (string) ronaldo@whera.com.br echo $email->getUsername(); // (string) ronaldo echo $email->getHostname(); // (string) whera.com.br print_r($email->getMx()); // (array) list mx records echo $email; // (string) ronaldo@whera.com.br } catch (\InvalidArgumentException $e) { echo $e->getMessage(); }
Testing
$ composer test
Security
If you discover any security related issues, please email ronaldo@whera.com.br instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.