ultratek Posted September 30, 2008 Share Posted September 30, 2008 i was wondering what is wrong with this the same version of this script works on my dads site. i wanted to do the same with my site, all i changed was the smtp address and took out the echo here is my dads script: <?php ini_set("SMTP","bosmail.nt.com"); $name = $_POST['name']; $phone = $_POST['phone']; $email = $_POST['email']; $subject = $_POST['subject']; $comments = $_POST['comments']; $name = $name; //senders name $email = $email; //senders e-mail adress $recipient = "atomicstructure@gmail.com"; //recipient //$recipient = "copiman@gmail.com"; //recipient //$recipient = "ravimrk_diya@yahoo.com"; //recipient $comments = "$comments...\n\n".$phone; $subject = $subject; //subject $header = "From: ". $name . " <" . $email . ">\r\n"; //optional headerfields mail($recipient, $subject, $comments, $header); //mail command echo "Mail has been sent successfully."; ?> And my script: <?php ini_set("SMTP","smtp1.easycgi.com"); $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $subject = $_POST['subject']; $comments = $_POST['comments']; $name = $name; //senders name $email = $email; //senders e-mail adress $recipient = "jvenablephoto@gmail.com"; //recipient //$recipient = "copiman@gmail.com"; //recipient //$recipient = "ravimrk_diya@yahoo.com"; //recipient $comments = "$comments...\n\n".$phone; $subject = $subject; //subject $header = "From: ". $name . " <" . $email . ">\r\n"; //optional headerfields mail($recipient, $subject, $comments, $header); //mail command ?> Quote Link to comment https://forums.phpfreaks.com/topic/126505-form/ Share on other sites More sharing options...
sKunKbad Posted September 30, 2008 Share Posted September 30, 2008 What kind of server? you might remove the SMTP setting and see if the mail will send through sendmail. Quote Link to comment https://forums.phpfreaks.com/topic/126505-form/#findComment-654222 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.