Forum Moderators: coopster

Message Too Old, No Replies

Form emailing to every address but the one needed

         

post human816

8:52 pm on Jul 6, 2007 (gmt 0)

10+ Year Member



I set up a simple contact form in php for a client of mine. The form works fine when I put any email address in it but the clients. Once I put theirs in, it appears to have been sent but the email never arrives.

Any help would be greatly appreciated.

Here is the code.

<?php

$EmailTo = "email@email.com";
$Subject = "Subject Here";
$ContactName = Trim(stripslashes($_POST['ContactName']));
$Title = Trim(stripslashes($_POST['Title']));
$Company = Trim(stripslashes($_POST['Company']));
$EMail = Trim(stripslashes($_POST['EMail']));
$Phone = Trim(stripslashes($_POST['Phone']));
$Details = Trim(stripslashes($_POST['Details']));

$Body = "";
$Body .= "Subject";
$Body .= "\r\n";
$Body .= "Contact Name: ";
$Body .= $ContactName;
$Body .= "\r\n";
$Body .= "Title: ";
$Body .= $Title;
$Body .= "\r\n";
$Body .= "Company: ";
$Body .= $Company;
$Body .= "\r\n";
$Body .= "E-Mail: ";
$Body .= $EMail;
$Body .= "\r\n";
$Body .= "Phone: ";
$Body .= $Phone;
$Body .= "\r\n";
$Body .= "Details: ";
$Body .= $Details;
$Body .= "\r\n";

$success = mail($EmailTo, $Subject, $Body, "From: <$ContactName>");

if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=sent.html\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
}
?>

jatar_k

9:04 pm on Jul 6, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld post human816,

I imagine it is getting filtered for some reason. You could check if it is ending up in their junk/spam folder.

post human816

9:15 pm on Jul 6, 2007 (gmt 0)

10+ Year Member



Thanks for the welcome Jartar. Unfortunatly its not that simple, lol. I actually had them set up an email account for me so I could test it. It's not going to the spam folder.

jatar_k

9:27 pm on Jul 6, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



do you know if their server nukes what it thinks is spam?

can you check on the server to see if the mail actually went to the mail queue?

post human816

10:23 pm on Jul 6, 2007 (gmt 0)

10+ Year Member



It ended up being a problem with their web host. I emailed tech support - They said it was a misconfiguration on the server that was causing it and they fixed it. I tested it and its working so all is well.

Thanks!

jatar_k

11:10 pm on Jul 6, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



always nice when a host actually helps ;)