 <p>Your script is working fine. You have to check some points</p> <ol> <li><p>Upload your scripts in your server. Do not run in localhost.</p></li> <li><p>Check the action and script name is same.</p></li> <li><p>Check mail to address is correct.</p></li> <li><p>Check you are running your script in a php installed server.</p></li> </ol>