1. Ensure you have PHP-CLI installed
  2. Install composer using the instructions listed here
  3. Check composer is install by usingphp71 composer.phar in the directory you installed it into.
  4. Make a new file in the installation folder called composer.json. This will contain information on the packages you wish to install.
  5. Add this into your composer.json file under requires: "phpmailer/phpmailer": "dev-master".
  6. Add your vendor configuration by specifying vendor-dir also in the composer.json file:"vendor-dir": "/dir/to/your/project/". The file should now look like this:composer stuff.jpg
  7. Run php71 composer.phar install
    installed.jpg
  8. Now you can require in  the dependencies to your project. Require it into your PHP files using require_once("vendor/autoload.php");.

PHPMailer should now be ready to use.

Advertisements