Saturday, 17 August 2013

when i send email with php i can not get it

when i send email with php i can not get it

my code is here , it is very simple code :
<form method="post" action="index.php">
<input type="text" name="to" /><br />
<input type="text" name="subject" /><br />
<textarea name="message"></textarea><br />
<input type="submit" name="send" value="send mail"/>
</form>
and php code here :
<?php
if(isset($_POST['send']))
{
try
{
$to=$_POST['to'];
$subject=$_POST['subject'];
$message=$_POST['message'];
$headers = "From: info@azhinehps.com";
//ini_set('smtp_port','25');
//ini_set('SMTP','smtp.azhinehps.com');
$t=mail($to,$subject,$message,$headers);
echo 'Send Successfully';
}
catch (Exception $e)
{
echo "con not send Email";
echo $e;
}
}
?>
ok ... i send a email to my hotmail ID i have not any error after click on
send button and i get "send successfully" Message . but when checking my
mail in my mail server yahoo and hotmail and other... i have not any email
..

No comments:

Post a Comment