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 trialalex mattingley
7,508 PointsIssues with Using a Third-Party Library code
Seem to be having issues with the PHPMailer object, but I am not sure why. If I have the contact form and I input any information and hit send I get a blank screen. If I remove the code added in the video (the same code posted below) everything executes as anticipated. I assume that means that the issue lies in this block of code:
require_once('inc/phpmailer/class.phpmailer.php');
$mail = new PHPMailer();
if (!$mail->ValidateAddress($email)){
echo "You must specify a valid email address.";
exit;
}
Does anyone see any issues here?
Thanks in advance for your help!
Ashley Shay
8,664 PointsI'm having this same issue and can't seem to find a version that works. What did you finally find that worked for you?
alex mattingley
7,508 PointsHi Ashley Download this version:
https://github.com/PHPMailer/PHPMailer/tree/phpmailer-5.2.0
Hope that helps!
Alex
2 Answers
alex mattingley
7,508 PointsHi Ashley Download this version:
https://github.com/PHPMailer/PHPMailer/tree/phpmailer-5.2.0
Hope that helps!
Alex
Ashley Shay
8,664 PointsThanks! It did help! :)
alex mattingley
7,508 Pointsalex mattingley
7,508 PointsFigured it out, had to do with the PHPMailer code. Somehow I managed to download a version that was not complete so it was not working like it was supposed to.