That’s it! If you don’t have one already, composer will create your “vendor” directory and populate your autoload file. You may be excited to get this code into your app, but first you need to make sure you’ve installed the necessary code library.įor this example, we’re going to be installing PHPMailer with Composer, since that is the preferred method for a great many PHP developers.
Looking for a top-notch dedicated server host? You’ve come to the right place.īelow, we’ll give you a quick and easy example of a working script you can use in your local development environment or live on your InMotion Hosting server.
And it’s open-source.įor more information about PHPMailer, or to contribute, check out the PHPMailer GitHub page. PHPMailer is a highly popular, actively developed email-sending library for PHP.