Jump to content

having problems with a simple mail script...


jbrill

Recommended Posts

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="[email protected]">General Information</option>
  				<option value="[email protected]">Sales</option>
  				<option value="[email protected]">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!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.