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 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 11,075 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!