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 Basic PHP Website (2018) Adding a Basic Form SMTP with Google

Error: SMTP conect() failed

Hi there!

After submitting the form, I get back " 2018-01-24 20:03:27 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP g127sm571957iog.85 - gsmtp 2018-01-24 20:03:27 CLIENT -> SERVER: EHLO localhost 2018-01-24 20:03:27 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [75.141.245.20]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8 2018-01-24 20:03:27 CLIENT -> SERVER: STARTTLS 2018-01-24 20:03:28 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS SMTP Error: Could not connect to SMTP host. 2018-01-24 20:03:28 CLIENT -> SERVER: QUIT 2018-01-24 20:03:28 2018-01-24 20:03:28 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting "

Instead of the thank you page. Is this because I'm using MAMP as a local host rather than workspaces?

Any help would be appreciated!

Thanks!