Page 1 of 1

email script help

Posted: Tue Dec 02, 2008 8:55 am
by PlagueInfected
for some reason this script here wont send me the mail, am i missing some piece of code

<?php

$name = $_POST['name'];
$email = $_POST['email'];
$information = $_POST['information'];


$message= "From $name using an email address of $email sent:
information: $information
";

$send=mail("email@domain.com","online inquiry",$message);

if($send){
echo ( "Thanks for making an inquiry, we'll get back to you soon!" );
}
else{
echo ( "There was an error in completing your request, please try again");
}

?>

Re: email script help

Posted: Wed Dec 03, 2008 3:03 am
by jaoudestudios
Try something like this...
http://www.forum.jaoudestudios.com/view ... ?f=13&t=13

Also what server are you running?

Re: email script help

Posted: Wed Dec 03, 2008 5:34 am
by silenceghost
your code doesn't have header
$header="From: ".$from;
mail($to,$subject,$message,$header);

Re: email script help

Posted: Wed Dec 03, 2008 7:31 pm
by PlagueInfected
jaoudestudios from your icon i'd rather not tell you lol

Windows IIS/6.0 running off of godaddy

ima try the latest post first and if it fails I'll try yours because I'd need to make my own form for it too lol

Re: email script help

Posted: Thu Dec 04, 2008 1:18 am
by jaoudestudios
haha.... :D

The reason I asked was because a lot of developers use WAMP at home and try to send mail but windows does not come with a mailserver.

Keep us posted. You'll get there in the end :)

Re: email script help

Posted: Thu Dec 04, 2008 9:27 am
by PlagueInfected
so far the easier looking code didnt work, ima try your but idk what variables to call from on the form yet =/ ima still look at it and see how it works.

i cant make my own server yet so i do my hosting elsewhere lol