Skip to content

Commit

Permalink
IHF: Email helpers docs added.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-ivanov committed Jul 1, 2016
1 parent e24715c commit 51fe627
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,25 @@ $isEmail = is_email('[email protected]');
// true
```
#### `to_rfc2822_email()`
Converts passed array of laravel addresses to [RFC 2822](http://www.faqs.org/rfcs/rfc2822.html) string, suitable for PHP [mail()](http://ua2.php.net/manual/en/function.mail.php) function:
```php
$address = to_rfc2822_email([
['address' => '[email protected]', 'name' => 'John Doe'],
['address' => '[email protected]'],
]);
// John Doe <[email protected]>, [email protected]
```
Also supports simplified way of usage with just one item:
```php
$address = to_rfc2822_email(['address' => '[email protected]', 'name' => 'John Doe']);
// John Doe <[email protected]>
```
## Format
#### `format_bytes()`
Expand Down

0 comments on commit 51fe627

Please sign in to comment.