i used this code for email

$to = "somebody@example.com";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: webmaster@example.com" . "\r\n" .
"CC: somebodyelse@example.com";

mail($to,$subject,$txt,$headers);

however this error shows up Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()..

i wanted to fix it without using outlook but the best solution i have googled so far is from this one, Drupal(Im not advertising it lol). However, I think I have to download Drupal. Is there any other way?

BTW i use XAMPP phpMyAdmin - 2.10.3

You are running this program on local host.
I think there should be a server on cloud to do that, not XAMPP on your system.
And i dont think Drupal is the solution for the problem. It is a complete CMS.
Vinayak

You are running this program on local host.
I think there should be a server on cloud to do that, not XAMPP on your system.
And i dont think Drupal is the solution for the problem. It is a complete CMS.
Vinayak

Ok so It should be live for it to work?

Ok so It should be live for it to work?

Yes
you can try any free web host for practicing(this is what i think you are doing) your PHP programs.
Vinayak

your error means that ur server is not configure to use smtp
or configured incorrectly which i dont think so .. are u using free webhosting?

or run it on local server?