|
Hello Guys,
You have probably seen this a million tims butim new to anything php (or website for that matter really).
My wife has recently taken over a company from her parents and has been given the website, they have changed their name and hosting company, they have a website designed in frontpage thst i have swapped from one hosting company (linux)andchanged toanother (windowsbased).
Im having problems getting the online form to email "leads" to their sales email, heres the code which is being used (that works on their old server)
<SCRIPT LANGUAGE="php">
$email = $HTTP_POST_VARS[email];
$mailto = "sales@121-vans.com";
$mailsubj = "Form submission";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form by : ".$REMOTE_ADDR."\n\nVisiting Page : ".$HTTP_REFERER."\n\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
$mailbody .= "$key : $val\n"; }
mail($mailto, $mailsubj, $mailbody, $mailhead);
</script>
Now all ive doen is change the email adddress -
<SCRIPT LANGUAGE="php">
$email = $HTTP_POST_VARS[email];
$mailto = "sales@vandiscount.co.uk";
$mailsubj = "Form submission";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form by : ".$REMOTE_ADDR."\n\nVisiting Page : ".$HTTP_REFERER."\n\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
$mailbody .= "$key : $val\n"; }
mail($mailto, $mailsubj, $mailbody, $mailhead);
</script>
and this doesnt work on the new server (neither will the old email from the new server)
Has anyone any ideas? Ive asked for the hosting to change to linux from windows and also used -
<?php
$to = "sales@vandiscount.co.uk";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@example.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>
to test that everything works how it should.
Thanks for any help
Simon
|