Chikwado wrote:Now, the php mail() function is not working. Why?
Because Thunderbird, Squirrelmail etc. are Mail
clients in order to receive Emails.
For the mail()-function you need to setup a Mail
server instead (see php.ini), which does not receive Emails, but send them. You must either specify an SMTP Server in php.ini or specify a Program like "
sendmail", which can send Emails. PHP cannot send Emails, it can only pass the credentials and arguments of mail()-function to the Server or Email Program.
Unfortunately, the SMTP configuration of PHP is very outdated and does not apply the option of configuring a Login (User, Password) for a SMTP Server. But nowadays, all SMTP Servers are protected via login, formerly (many years ago) SMTP where free and without login. You can only assign SMTP to localhost and create your own local SMTP server (using Mercury Mail). But this is a very sophisticated task. And it does not work mostly, as more or less all Email providers block Emails from private IPs due to SPAM problems.
Xampp delivers a fake
sendmail.exe (see your installation), you can apply this program in php.ini as
SendMail program. It comes with a configuration file
sendmail.ini, there you can apply a known public SMTP Server for your Emails (like Google or GMX). Your Emails then are send via GMX or Google.
Sending Emails via PHP from your private PC is a sophisticated task. It does not work out of the box. Remember that you had to specify SMTP Servers and UserID, Password in Thunderbird as well in order to send Emails.