jbrill Posted August 23, 2007 Share Posted August 23, 2007 hey guys, i cant figure out why this wont send the emails... i jsut never receive them! the form : <form action="sendemail.php" method="POST"> <div><h3>Email Us:</h3></div> <div style="padding-bottom:10px;">Your Email Address:<br><input type="text" name="email" id="email" width="50"></div> <div style="padding-bottom:10px;">Message:<br><textarea name="message" id="message" cols="40" rows="10"></textarea></div> <div style="padding-bottom:10px;"> Send To:<br> <select name="emailto" id="sendto"> <option value="info@bbold.com">General Information</option> <option value="jordan@bbold.com">Sales</option> <option value="jordb@dccnet.com">Shipping</option> </select> </div> <div style="padding-bottom:10px;"><input type="submit" name="submit" id="submit"></div> </form> sendemail.php : <?php $to = $_POST['sendto']; $subject = 'Inquiry From Website'; $message = $_POST['message']; $headers = 'From:'. $_POST['email'] . "\r\n" . 'Reply-To:'. $_POST['email'] . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ?> Thanks!! Quote Link to comment https://forums.phpfreaks.com/topic/66386-having-problems-with-a-simple-mail-script/ Share on other sites More sharing options...
marcus Posted August 23, 2007 Share Posted August 23, 2007 You're going to need more header information to send to some of those free mail servers. Quote Link to comment https://forums.phpfreaks.com/topic/66386-having-problems-with-a-simple-mail-script/#findComment-332229 Share on other sites More sharing options...
Daleeburg Posted August 23, 2007 Share Posted August 23, 2007 First off, there is no such thing as a "simple" mail scrpit. Second, are you trying this on a local test server and does the server have a mail cleint? Quote Link to comment https://forums.phpfreaks.com/topic/66386-having-problems-with-a-simple-mail-script/#findComment-332255 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.