Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Build a Simple PHP Application Wrapping Up The Project Using A Third-Party Library

David Labourdette
David Labourdette
7,127 Points

PHPMailer - Video needs to be updated.

I'm not quite sure what to do here because the video and the files in the updated PHPMailer have been changed. Does anyone know if treehouse has posted another video for this somewhere else? Or where I can get some guidance? Thanks!

4 Answers

You'll be pleased to hear that not a whole bunch has changed with PHPMailer files.

The only real difference is that instead of including a specific mailer file, you include the autoloader and let PHPMailer do the autoloading for the type of mailer you're trying to use.

The instructions on their github page should see you through most set up queries.

Are you stuck on any one particular bit or just peeved it's a bit out of date? If it's the latter, I would drop Treehouse an email and request an update :-)

Juliette Tworsey
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 Points

So where is the link to the latest version and how do I access the installation instructions on Github? There are many links @ the link that you have provided. I have no idea on where to start as I am not familiar (at all) with Github.

...totally lost in space here...

Thanks!

there was an updated link in the notes section at the bottom of the page.

David Labourdette
David Labourdette
7,127 Points

No sir.

There is an updated link for the PHPMailer files, but not a new video with how to work with the new files.

the read me file has all the info you should need for basic stuff just stick with the base example there https://github.com/PHPMailer/PHPMailer/blob/master/README.md

Juliette Tworsey
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 Points

Thanks Shawn! My brain became a bit discombobulated when I saw all of those commits. BTW, what are commits, open-source updates to the program's code?

Thanks again:-)

It sounds like you've already found what you're looking for via shawn stokes, so awesome!

To learn about github, you're better off learning about git first. Have you seen the GIt Basics Course here on Treehouse? This course has a badge of 'Working With Remote Repositories', which should go through github.

And yes, you've pretty much described commits! But projects aren't necessarily open source.

Following the the link I sent, there's a section on that page called 'Installation & loading'. You're not using composer, so this bit is for you:

Alternatively, just 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.

This will download the entire project (exactly the same files you can see at the top of the page) into a zip file. Unpack the zip file, and place the contents into a suitably named folder in your project. 'PHPMailer' should do it ;)

There's another section titled 'A Simple Example' (about half way down). Just require the autoloader and away you go! This should look pretty similar to the Shirts4Mike application, where I think you require the the PHPMailer class directly - you can replace that line with the line below (but remember to update the path to match your project). The rest of it should be pretty similar!

<?php

require 'PHPMailer/PHPMailerAutoload.php';