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 Utilizing Object Properties and Methods

Please help

when i hit Send it shows me an error message in browser : Message could not be sent.Mailer Error: Could not instantiate mail function.

can anyone tell where is problem? :)

Dane Parchment
Dane Parchment
Treehouse Moderator 10,632 Points

Can you please provide the code that is causing the issue, it will make it easier for us to debug the issue for you, as their could be many reasons for this happening.

What kind of development environment are you using? Are you using XAMP or your own Windows or Linux server?

Obayanju Damilare
Obayanju Damilare
3,383 Points

Hi, I got the same error and I use a XAMP server. Please what's the solution

1 Answer

Matt Corby
Matt Corby
2,385 Points

I was having the same issue. I'm using an XAMPP server.

I used the solution provided here: http://stackoverflow.com/questions/15965376/how-to-configure-xampp-to-send-mail-from-localhost

You have to change some settings in you php.ini and sendmail.ini files!