helloise Posted March 25, 2011 Share Posted March 25, 2011 please help, here is all my code: <div id='div_phone_big'> </div> <head> <script type="text/JavaScript"> function getChoice(val) { yesNo = new Array("Yes", "No"); var getsel = document.contactus.yesnolist.value; var e = document.getElementById("yesnolist"); var strUser = e.options[e.selectedIndex].value; if (strUser == "no") { //alert('lakjdlakjsdlajd'); window.location.href = "http://www.rainbowcode.net/index.php/util/faq"; //document.write(window.location.href); window.location('http://www.rainbowcode.net/index.php/util/faq'); } else { document.contactus.emailreply.value = ""; document.contactus.commtext.value = ""; document.contactus.message.value = ""; document.contactus.commlist.value = ""; } return strUser; } function getCommChoice(x) { comm = new Array("Compliment","Complaint","Feedback","Suggestion","Billing Query","Other"); var getsel = document.contactus.commlist.value; document.contactus.message.value = comm[getsel]; return document.contactus.message.value; } function sayThanks() { alert("Thank you for submitting"); return true; } </script> </head> <body> <form name = "contactus" method="post" onSubmit="return sayThanks()"> <table class='table_format_content_rbc' border='0'> <div> <span class='spn_big_lightblue_rbc'>RAINBOW</span><span class='spn_big_black_rbc'>CODE: CONTACT US </span> <td colspan='3' align='left' class='small_header_rbc'> <h3>Problems and general queries</h3> <li>Phone our call centre on 086 110 6472 ( Available 8am-5pm from monday-friday ) or</li> <li>Email us at <a href="mailto:[email protected]">[email protected]</a> </li> </td> </div> <div> <tr></tr> <tr></tr> <tr> <td colspan='3' align='left' class='small_header_rbc'> <h3>Frequently Asked Questions</h3> <li>Please take a moment to read the Frequently Asked Questions as the solution to your query could be waiting for you there!</li> <li>Have you read the <?php echo link_to('FAQ','util/faq') ?> ? <select id="yesnolist" onChange="getChoice(this.value)"> <option value="yes" selected="selected">Yes</option> <option value="no">No</option> </select> </li> </tr> <tr></tr> <tr></tr> </div> <div> <tr> <td colspan='3' align='left' class='small_header_rbc'> <h3>Feedback and Suggestions</h3> </select> </li> <textarea name="message" rows="10" cols="20"></textarea> <br /><br /> <?php $to = "[email protected]"; $subject = $_REQUEST["commlist"]; $email = $_REQUEST["emailreply"]; $message = $_REQUEST["message"]; $headers = "From: $email"; mail($to, $subject, $message, $headers); ?> <input type="submit" value="Send"> <input type="reset" value="Reset"> </td> </tr> </div> </table> <table class='table_format_content_rbc' border='0'> <tr> <td colspan='3' align='left' class='small_header_rbc'> <br/> </td> <tr> </table> </form> </body> and also set the php.ini file portion: ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ; http://php.net/sendmail-path sendmail_path = /usr/sbin/sendmail -t and also ran: $ sudo echo "test" | mail -s "test" [email protected] The program 'mail' can be found in the following packages: * heirloom-mailx * mailutils please help?? <option value="feedback">Feedback</option> <option value="suggestion">Suggestion</option> <option value="billquery">Billing Query</option> <option value="other">Other</option> </select> </li> <textarea name="message" rows="10" cols="20"></textarea> <br /><br /> <?php $to = "[email protected]"; $subject = $_REQUEST["commlist"]; $email = $_REQUEST["emailreply"]; $message = $_REQUEST["message"]; $headers = "From: $email"; mail($to, $subject, $message, $headers); ?> <input type="submit" value="Send"> <input type="reset" value="Reset"> </td> </tr> </div> </table> <table class='table_format_content_rbc' border='0'> <tr> <td colspan='3' align='left' class='small_header_rbc'> <br/> </td> <tr> </table> </form> </body> and also set the php.ini file portion: ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ; http://php.net/sendmail-path sendmail_path = /usr/sbin/sendmail -t and also ran: $ sudo echo "test" | mail -s "test" [email protected] The program 'mail' can be found in the following packages: * heirloom-mailx * mailutils please help?? Quote Link to comment https://forums.phpfreaks.com/topic/231665-mailto-subject-message-headers-not-working/ Share on other sites More sharing options...
MrXHellboy Posted March 25, 2011 Share Posted March 25, 2011 Testing @ localhost or your webserver @ hosting company ? Quote Link to comment https://forums.phpfreaks.com/topic/231665-mailto-subject-message-headers-not-working/#findComment-1192067 Share on other sites More sharing options...
helloise Posted March 25, 2011 Author Share Posted March 25, 2011 huh? i dont understand? im new to all of this please help? thank you Quote Link to comment https://forums.phpfreaks.com/topic/231665-mailto-subject-message-headers-not-working/#findComment-1192076 Share on other sites More sharing options...
helloise Posted March 25, 2011 Author Share Posted March 25, 2011 i did not post all my code...oops, here it is: <div id='div_phone_big'> </div> <head> <script type="text/JavaScript"> function getChoice(val) { yesNo = new Array("Yes", "No"); var getsel = document.contactus.yesnolist.value; var e = document.getElementById("yesnolist"); var strUser = e.options[e.selectedIndex].value; if (strUser == "no") { //alert('lakjdlakjsdlajd'); window.location.href = "http://www.rainbowcode.net/index.php/util/faq"; //document.write(window.location.href); window.location('http://www.rainbowcode.net/index.php/util/faq'); } else { document.contactus.emailreply.value = ""; document.contactus.commtext.value = ""; document.contactus.message.value = ""; document.contactus.commlist.value = ""; } return strUser; } function getCommChoice() { comm = new Array("Compliment","Complaint","Feedback","Suggestion","Billing Query","Other"); var getsel = document.contactus.commlist.value; document.contactus.message.value = comm[getsel]; //return document.contactus.message.value; } function sayThanks() { alert("Thank you for submitting"); return true; } </script> </head> <body> <form name = "contactus" method="post" onSubmit="return sayThanks()"> <table class='table_format_content_rbc' border='0'> <div> <span class='spn_big_lightblue_rbc'>RAINBOW</span><span class='spn_big_black_rbc'>CODE: CONTACT US </span> <td colspan='3' align='left' class='small_header_rbc'> <h3>Problems and general queries</h3> <li>Phone our call centre on 086 110 6472 ( Available 8am-5pm from monday-friday ) or</li> <li>Email us at <a href="mailto:[email protected]">[email protected]</a> </li> </td> </div> <div> <tr></tr> <tr></tr> <tr> <td colspan='3' align='left' class='small_header_rbc'> <h3>Frequently Asked Questions</h3> <li>Please take a moment to read the Frequently Asked Questions as the solution to your query could be waiting for you there!</li> <li>Have you read the <?php echo link_to('FAQ','util/faq') ?> ? <select id="yesnolist" onChange="getChoice(this.value)"> <option value="yes" selected="selected">Yes</option> <option value="no">No</option> </select> </li> </tr> <tr></tr> <tr></tr> </div> <div> <tr> <td colspan='3' align='left' class='small_header_rbc'> <h3>Feedback and Suggestions</h3> <li>E-mail address to reply to: <input type="text" name="emailreply"> </li> <li>Nature of communication: <select name="commlist" onChange="getCommChoice()"> <option value="compliment">Compliment</option> <option value="complaint">Complaint</option> <option value="feedback">Feedback</option> <option value="suggestion">Suggestion</option> <option value="billquery">Billing Query</option> <option value="other">Other</option> </select> </li> <textarea name="message" rows="10" cols="20"></textarea> <br /><br /> <?php $to = "[email protected]"; $subject = $_POST["commlist"]; $message = $_POST["message"]; $from = $_POST["emailreply"]; $headers = "From: ".$from; mail($to, $subject, $message, $headers); ?> <input type="submit" value="Send"> <input type="reset" value="Reset"> </td> </tr> </div> </table> <table class='table_format_content_rbc' border='0'> <tr> <td colspan='3' align='left' class='small_header_rbc'> <br/> </td> <tr> </table> </form> </body> please help? thank you Quote Link to comment https://forums.phpfreaks.com/topic/231665-mailto-subject-message-headers-not-working/#findComment-1192078 Share on other sites More sharing options...
monkeytooth Posted March 25, 2011 Share Posted March 25, 2011 Ok, 2 questions one already asked.. But Ill ask again, Are you attempting to work with this on your own private enviroment locally through the use of a home brew server like lets say "WAMP", or "XAMP" or anything like that. Cause if you are, chances are unless you have a mail server on that same system of some sort your not going to be able to get mail out. Otherwise you would be testing this on a hosting service, hostgator, enom, godaddy, other, something your paying for that your uploading to then testing.. If its godaddy, that could be one of your issues right there, as godaddy requires you to go through a special means of sending mail through there system through your site.. If its not godaddy, and its not your own local enviroment. Then the second question would be.. is what is the specific error message your seeing? Quote Link to comment https://forums.phpfreaks.com/topic/231665-mailto-subject-message-headers-not-working/#findComment-1192098 Share on other sites More sharing options...
helloise Posted March 25, 2011 Author Share Posted March 25, 2011 here at work i run ubuntu 10.04 php: 5.3.2 symfony 1.4.2 apache2 and gmail os: 'Linux helloise 2.6.32-27-generic #49-Ubuntu SMP Wed Dec 1 23:52:12 UTC 2010 i686' so im in a work environment where everything is set up..nothing "home brewed" i dont get any error messages the mail just does not come through on my gmail im only but 6 months new in all of this stuff..so sorry if i dont know what you are talking about Quote Link to comment https://forums.phpfreaks.com/topic/231665-mailto-subject-message-headers-not-working/#findComment-1192111 Share on other sites More sharing options...
helloise Posted March 28, 2011 Author Share Posted March 28, 2011 RESOLVED Quote Link to comment https://forums.phpfreaks.com/topic/231665-mailto-subject-message-headers-not-working/#findComment-1193170 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.