sending mail
Posted: Thu Apr 09, 2009 3:37 am
i sent a email using the following cord.
<?php
$to=$_POST["to"];//to=udara99@gmail.com
$from=$_POST["from"];//from=udara77@yahoo.com
$subject=$_POST["sub"];
$message=$_POST["msg"];
$headers="from: " .$from ."\r\n";
$mailsent=mail($to,$subject,$message,$headers);
if($mailsent){
echo "Congratulation the mail has been sent<br>";
echo "<b>To :<b> $to<br>";
echo "<b>From :<b> $from<br>";
echo "<b>Subject :<b> $subject<br>";
echo("<b>message :<b> <br>");
echo("$message");
}else
echo("the mail not sent");
?>
this code output in a way that email has been sent,but actually it has not been sent.
im using localhost.
dont know y>
<?php
$to=$_POST["to"];//to=udara99@gmail.com
$from=$_POST["from"];//from=udara77@yahoo.com
$subject=$_POST["sub"];
$message=$_POST["msg"];
$headers="from: " .$from ."\r\n";
$mailsent=mail($to,$subject,$message,$headers);
if($mailsent){
echo "Congratulation the mail has been sent<br>";
echo "<b>To :<b> $to<br>";
echo "<b>From :<b> $from<br>";
echo "<b>Subject :<b> $subject<br>";
echo("<b>message :<b> <br>");
echo("$message");
}else
echo("the mail not sent");
?>
this code output in a way that email has been sent,but actually it has not been sent.
im using localhost.
dont know y>