Friends
i,m building ( forgotpassword.php) page in which i send the password to the email of the user who request it but i usually get this error message

Warning: mail() [function.mail]: Failed to connect to mailserver at "mail.7a*****er.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\tourism 1\forgotpassword.php on line 194


i tried many times but i failed

here is the code i,m using and i hope to know the reason of this message i get


//setting ini
ini_set("SMTP", "mail.7ansafer.com");
ini_get("SMTP");

// generate new password to be sent to the user
$generatepass=chr(rand(65,122)).rand(000,999).chr(rand(65,122)).chr(rand(65,122)).rand(000,999);

//getting ready to send e mail
$to=$getmail;
$subject="Your new password ";
$headers="From:admin";
$body ="
Dear $dbuser \n
the message sent to the user telling him that he requested a new password and so on
\n \n
The new password ---> $generatepass";


//mail function
mail($to, $subject, $body, $headers);

End of the code

i,m waiting for your messages about this