Fail in sending message to email

hi guys i always fail in sending a message to an email, i’ve try to use many way like…

$kirim_email=mail($kepada,$judul,$pesan,$dari);
if($kirim_email){
echo “[success]”;
}else{
echo “[fail]”;
}

i’ve try to edit php.ini…

extension=php_smtp.dll
SMTP = localhost
smtp_port = 25
sendmail_path = “D:\xampp\sendmail\sendmail.exe -t”

but still error and there is message…

Warning: mail() [function.mail]: Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set() in D:\xampp\htdocs\email\index.php on line 81

can anybody fix my problem…? need help my master very much, thanks…

I’m not sure of the possibilities here, but I have the idea that sending email from your local environment with mail() doesn’t work (or at least requires something extra). What happens if you try this from a remote server?