Skip to content

Commit

Permalink
Add changelog & update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad Fedorczyk committed Mar 22, 2021
1 parent e849126 commit ca56886
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
14 changes: 14 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Change Log
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [1.0.3] - 2021-03-22

### Added
- Ability to simple check MX records of a domain

### Changed

### Fixed
16 changes: 15 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://travis-ci.com/fedek6/tld-mail-validator.svg?token=Fpapy2MXqrwtfsLgfThp&branch=main)](https://travis-ci.com/fedek6/tld-mail-validator)

PHP e-mail address validator using list of all known [TLDs](https://data.iana.org/TLD/tlds-alpha-by-domain.txt). With ability to automatically update tlds list.
PHP e-mail address validator using list of all known [TLDs](https://data.iana.org/TLD/tlds-alpha-by-domain.txt) and simple domain MX record check. With ability to automatically update top-level domains list.

## Usage example

Expand All @@ -25,6 +25,13 @@ if ($validator->validate('[email protected]')) {
}
```

If you want to test also MX record of a domain (slower), pass second argument to the constructor:

```php
/** @var \Fedek6\TldMailValidator\TldMailValidator $validator */
$validator = new TldMailValidator($tldsFilePath, TldMailValidator::TEST_ALL);
```

## Testing

```bash
Expand All @@ -42,3 +49,10 @@ Or:
```bash
vendor/bin/phpunit --testdox --verbose --colors tests/RemoteFileUpdaterTest.php
```

### Dry run before deploy

```bash
php -f examples/mx.php
php -f examples/simple.php
```

0 comments on commit ca56886

Please sign in to comment.