-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e24715c
commit 51fe627
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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()` | ||
|