Hi all!! It's been a while since I was last needing some PHP help, but I knew the time would come!! I have tried to add an online emailer to a site. I am sure that I've used this code before without any problems but it's not working. I have uploaded it to the webspace and am able to get all the way through and the mailer reports that the email has been sent. However, it never gets received... When I send something through mail($to, $subject, etc.... where is it sending it to exactly?? Do I not need to specify the pop or smtp settings or anything like that?? I get no error messages to work from so I'm pretty stuck. Here is my code if it is of any use in aiding me. Any help is super greatly appreciated!! Many thanks Sheldon [code]<?php // set flag to indicate whether mail has been sent $mailSent = false; if (array_key_exists('ewComments', $_POST)) { // mail processing script // remove escape characters from POST array if (get_magic_quotes_gpc()) { function stripslashes_deep($value) { $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); return $value; } $_POST = array_map('stripslashes_deep', $_POST); } //validate the input, beginning with name $name = trim($_POST['name']); if (empty($name)) { $error['name'] = 'Please enter your name'; } $email = $_POST['email']; // check for valid email address $pattern = '/^[^@]+@[^\s\r\n\'";,@%]+$/'; if (!preg_match($pattern, trim($email))) { $error['email'] = 'Please enter a valid email address'; } // check the content of the message area $messageBody = trim($_POST['message']); if (empty($messageBody)) { $error['message'] = 'Please enter your message'; } // initialise variables $to = 'sheldongold@invate.co.uk'; $subject = 'Comment from Invate website'; // build the message $message = 'On '.date('l, M j, Y').' at '.date('g:ia').', '; $message .= "$name ($email) wrote: \n\n"; $message .= $messageBody; // build the additional headers $additionalHeaders = "From: Invate Website<info@invate.co.uk>\n\n"; $additionalHeaders .= "Reply-To: $email"; // send the email if there are no errors if (!isset($error)) { $mailSent = mail($to, $subject, $message, $additionalHeaders); // check that the mail was sent successfully if (!$mailSent) { $error['notSent'] = 'Sorry, there was a problem sending your mail. Please try again later.'; } } } ?> <div id="main_nav"> <table cellpadding="0" cellspacing="0" id="tbl_main"> <tr> <td id="td_main_side"><img src="images/footer_filler.gif" alt="main filler" width="20" height="39" /></td> <td id="td_main_content"><?php if (isset($error['notSent'])) { ?> <h1>Server Error </h1> <p class="warning"><?php echo $error['notSent']; ?></p> <?php } elseif ($mailSent) { ?> <h1>Thank you for your comments</h1> <p>We appreciate your feedback, and will be in touch if neccessary.</p> <?php } else { ?> <h1>Send us your comments </h1> <p>We hope you have enjoyed the site. If you have any comments or questions or simply want to contact us, please fill in the following form. Invate will not use your name or email address for any purpose other than replying to you. </p> <?php } ?> <?php if (!$mailSent) { ?> <form action="<?php $_SERVER['PHP_SELF']; ?>" method="post" name="contactForm" id="contactForm" onsubmit="MM_validateForm('name','','R','email','','RisEmail','message','','R');return document.MM_returnValue"> <p> <label for="name">Name:</label> <?php if (isset($error['name'])) { ?> <span class="warning"><?php echo $error['name']; ?></span> <?php } ?> <br /> <input type="text" name="name" id="name" <?php if(isset($error)) {echo "value='$name'";} ?> /> </p> <p> <label for="email">Email:</label> <?php if (isset($error['email'])) { ?> <span class="warning"><?php echo $error['email']; ?></span> <?php } ?> <br /> <input type="text" name="email" id="email" <?php if(isset($error)) {echo "value='$email'";} ?> /> </p> <p> <label for="message">Message:</label> <?php if (isset($error['message'])) { ?> <span class="warning"><?php echo $error['message']; ?></span> <?php } ?> <br /> <textarea name="message" id="message"><?php if(isset($error)) {echo $messageBody;} ?></textarea> </p> <p> <input name="ewComments" type="submit" id="ewComments" value="Send Message" /> </p> </form> <?php } ?> </td> </tr> </table> </div> [/code] THANKS AGAIN IN ADVANCE!!!