Warning: mail() [function.mail]: SMTP server response: 503 5.5.2 Need
Rcpt command. in D:\Websites\meditab\mail.php on line 50
Plz help me himf...@gmail.com
I am using php5 with IIS
#######################################
Code of mymail function given below
################################
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body>
<?
$firstname="";
$lastname="";
$street12="";
$street22="";
$area="";
$city="";
$postcode="";
$tel="";
$email="";
if(isset($_POST["firstname"])) $firstname= $_POST["firstname"];
if(isset($_POST["lastname"])) $lastname= $_POST["lastname"];
if(isset($_POST["street12"])) $email= $_POST["street12"];
if(isset($_POST["street22"])) $email= $_POST["street22"];
if(isset($_POST["area"])) $email= $_POST["area"];
if(isset($_POST["city"])) $email= $_POST["city"];
if(isset($_POST["postcode"])) $email= $_POST["postcode"];
if(isset($_POST["tel"])) $email= $_POST["tel"];
if(isset($_POST["email"])) $email= $_POST["email"];
$fromaddress="Hardik Shah<batt...@yahoo.com";
$emailsubject="This mail is from Hardik";
$headers = "From: $fromaddress\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$emailmessage=" <b>Following details of sent by Hardik</b><br><br>";
$emailmessage.=" <b>First Name</b>: ".$firstname."<br>";
$emailmessage.=" <b>Last Name</b>: ".$lastname."<br>";
$emailmessage.=" <b>Street 1</b>: ".$street12."<br>";
$emailmessage.=" <b>Street 2</b>: ".$street22."<br>";
$emailmessage.=" <b>area</b>: ".$area."<br>";
$emailmessage.=" <b>city</b>: ".$city."<br>";
$emailmessage.=" <b>postcode</b>: ".$postcode."<br>";
$emailmessage.=" <b>Mobile No.</b>: ".$tel."<br>";
$emailmessage.=" <b>Email</b>: ".$email."<br>";
$toemail="www.monar...@gmail.com";
mail($toemail,$emailsubject,$emailmessage,$headers);
?>
</body>
</html>
If this is the code you're using exactly, then when you assign all of
those variables about the user info (($street12, $street22, and so
on)), you're assigning the last 7 of them to the $email variable,
overwriting whatever you had just assigned to it. Also, look into the
format of the 'from' address. It's yelling at you that it needs a
proper recipient to send the email to. The big spec is here:
http://www.faqs.org/rfcs/rfc2822, but try sending first with an email
address formatted like this:
Without the less-than or greater-than's. Windows ((as i see you're
running IIS)) has its mail working differently, and sometimes cannot
accept an address formatted like
Someone <so...@one.com>
Good luck. :)