Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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!