PDA

View Full Version : mail codes


1234
07-26-2002, 05:50 PM
I try to use E-mail system. I want you to check my code.

my php is 4.2

my php editor says "$from .="<". $mailadr .">";
mail($sendto, $subject, $msg, $from);" These lines are wrong.

I tested so many times.

It is not working

Thank you for your time



<?php
$sendto = "itohideo@domaindlx.com";
$yourname = $_POST["yourname"];
$mailadrs = $_POST["mailadrs"];
$subject = $_POST["subject"];
$msg = $_POST["msg"];
$no = 0;
if ($yourname == "") {
print("Please Enter your Name<br>\n");
$no = 1;
}
if ($mailadrs == "") {
print("Please Enter your mailad<br>\n");
$no = 1;
}
if($subject == "") {
print("Please Enter your title<br>\n");
$no = 1;
}
if ($msg == "") {
print("Please Enter your comments<br>\n");
$no = 1;
}
if ($no != 1) {
$from = "From:" .$yourname. "\n";
$from .="<". $mailadr .">";
mail($sendto, $subject, $msg, $from);
} else {
echo "Mail did not send.";
}
?>

Spookster
07-26-2002, 06:42 PM
1234, this will be your first and only warning. Stop creating multiple posts with the same question. You are in violation of our forum rules.