0810
08-25-2002, 10:45 PM
E-mail problem and SMTP
HI all thanks
I did like this but it is not working.
I downloaded SMTP from www.postcastserver.com .
but I don't know how to use SMTP with php
Please tell me about it
Thanks
Here is code
<?php
$sendto = "itohideo@hotmail.com";
$yourname=$_POST["yourname"];
$mailadrs=$_POST["mailadrs"];
$subject=$_POST["subject"];
$msg=$_POST["msg"];
if($yourname == ""){
print("Enter your name please<br>\n");
exit;
}
if($mailadrs == ""){
print("Enter your mail please<br>\n");
exit;
}
if($subject == "")
{
print("Enter your subject<br>\n");
}
if($msg ==""){
print("Enter your comments<br>\n");
exit;
}
$from = mb_encode_mimeheader("From:".$yourname) ."\n";
$from .="<" .$mailadrs.">";
mb_send_mail($sendto,$subject,$msg,$from);
?>
</body>
</html>
HI all thanks
I did like this but it is not working.
I downloaded SMTP from www.postcastserver.com .
but I don't know how to use SMTP with php
Please tell me about it
Thanks
Here is code
<?php
$sendto = "itohideo@hotmail.com";
$yourname=$_POST["yourname"];
$mailadrs=$_POST["mailadrs"];
$subject=$_POST["subject"];
$msg=$_POST["msg"];
if($yourname == ""){
print("Enter your name please<br>\n");
exit;
}
if($mailadrs == ""){
print("Enter your mail please<br>\n");
exit;
}
if($subject == "")
{
print("Enter your subject<br>\n");
}
if($msg ==""){
print("Enter your comments<br>\n");
exit;
}
$from = mb_encode_mimeheader("From:".$yourname) ."\n";
$from .="<" .$mailadrs.">";
mb_send_mail($sendto,$subject,$msg,$from);
?>
</body>
</html>