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 Sending The Contact Form Email

Charles Franklin
Charles Franklin
17,535 Points

PHP Mailer... again...

I'm not sure why I'm having such a hard time with this topic. I think it stems from the fact that the files that the instructor is using in the video do not match the current versions that are out there. I can follow along the video but the version of PHP Mailer that is currently out there is much more complex than the one he uses in his video. The current version has all of these protected and public classes and about 2500 lines of code...

In this video he uses a simple cut and paste from the phpMailer file to his contact file. But in the current version of phpMailer, where do I cut and paste from? I cant find any code that resembles what he is doing..

thanks..

chip

Why don't you cut and paste the instructor's code?

4 Answers

Brandi Evans
Brandi Evans
14,450 Points

You could download the project file. Otherwise you'll have to add another class that you downloaded. If you open the form in your browser and test it, it will tell you which file is missing.

Charles Franklin
Charles Franklin
17,535 Points

The project files don't match what he's putting on the screen...

Brandi Evans
Brandi Evans
14,450 Points

The files you downloaded phpmailer from came with several more classes. I had to drop an extra one of those into my inc/phpmailer folder. I can't remember which. Just do all of them and see if that helps.

Rastislav Marecek
Rastislav Marecek
15,279 Points

In the video he just downloads the phpmailer.php into his inc folder. The code that he copies and pastes is from an example of how to use the phpmailer.

Randy Wang
Randy Wang
9,291 Points

I ended up copy all of the files into my inc/phpmailer directory and things started to function normally. We'll see if I come across other issues.