smtp server installation

Hi,I am new to php development .I am executing mail function and working on email sample.so when I execute the php file it give error given below:
Failed to connect to mailserver at “mail.gmail.com” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set() in C:\wamp\www\phpExample\sendmail.php on line 7

Here is my code:

<?php $to = $_POST['to']; $from = $_POST['from']; $sub = $_POST['subject']; $msg = $_POST['message']; $send = mail($to, $from, $sub, $msg); if($send) { echo "massage successfully send.";exit; } else { echo "error sending mail";exit; } ?>

gives some suggestion

Sponsor our Newsletter | Privacy Policy | Terms of Service