 <p>Dear if you are working on a local server just like XAMPP or APPSERV or whatsoever you have to install mail server on you local machine </p> <p>and if you are working on a real host server make sure the the php setting in the server allow you to use mail function cuse many server has stop this function.</p> <p>so i recommend you to use smtp to send mail take a look here </p> <p><a href="http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm" rel="nofollow">http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm</a></p> <p>and there is a supper powerful library to send email PHPMailer </p> <p><a href="https://code.google.com/a/apache-extras.org/p/phpmailer/" rel="nofollow">https://code.google.com/a/apache-extras.org/p/phpmailer/</a></p>