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 Building Websites with PHP Contact Form & Sending Email Sending Our Email

Daniel Goldberg
Daniel Goldberg
12,443 Points

Unable to send e-mail through localhost (XAMPP).

I have been following along using Terminal on Mac, and using port 8080 on my localhost (as instructed in Slim's "First Application Walkthrough) which is set up using XAMPP. My index.php file is identical to what is shown in the video and everything was working fine until I tried to actually send an e-mail. When I hit submit, Terminal gives me a message that reads "Segmentation fault: 11" and automatically exits out of port 8080. The browser shows a broken page that reads "The localhost page isn't working. localhost didn't send any data"

Does anyone know why I am encountering this problem and how I might go about fixing it?

1 Answer

Hi there Daniel!

Instead of SendMail you can use Postfix. It's already installed on mac and you need only to configure it properly.

1) Here is the small tutorial how to configure it on mac (link).

2) And alternative tutorial

Second tutorial describe in detail's how to do it with other SMTP providers and how to test it properly.

After you configure mail server and test it. Try to send email from contact form.

Best regards.