Skip to content

Commit

Permalink
addex how to install with composer
Browse files Browse the repository at this point in the history
  • Loading branch information
royopa committed Jul 14, 2015
1 parent db33c00 commit a378ec7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ PHPMailer is available via [Composer/Packagist](https://packagist.org/packages/p

"phpmailer/phpmailer": "~5.2"

or use the command below:

```sh
composer require phpmailer/phpmailer
```

Alternatively, copy the contents of the PHPMailer folder into somewhere that's in your PHP `include_path` setting. If you don't speak git or just want a tarball, click the 'zip' button at the top of the page in GitHub.

If you're not using composer's autoloader, PHPMailer provides an SPL-compatible autoloader, and that is the preferred way of loading the library - just `require '/path/to/PHPMailerAutoload.php';` and everything should work. The autoloader does not throw errors if it can't find classes so it prepends itself to the SPL list, allowing your own (or your framework's) autoloader to catch errors. SPL autoloading was introduced in PHP 5.1.0, so if you are using a version older than that you will need to require/include each class manually.
Expand Down

0 comments on commit a378ec7

Please sign in to comment.