I tried to send an email through php
this is the code..
if((empty($pass wd))||(empty($u name))){
$pwdmsg="Invali d Username or Email Id";
}
else{
$header='MIME-VERSION 1.0'.'\r\n';
$header.='Conte nt-type: text/html; charset=iso-8859-1'.'\r\n';
$header.='From: admin@tophospit alsindia.com'.' \r\n';
$subj="Password Request";
$To=$_POST['txtemailid'];
$ms="<table><tr ><td>User Name</td><td>".$uname ."</td></tr><tr><td>Pass word</td><td>".$passw d."</td></tr></table>";
mail($To,$subj, $ms,$header);
$pwdmsg="Passwo rd will be sent to your mail!";
it is displaying one error msg "SMTP server error"
this is the code..
if((empty($pass wd))||(empty($u name))){
$pwdmsg="Invali d Username or Email Id";
}
else{
$header='MIME-VERSION 1.0'.'\r\n';
$header.='Conte nt-type: text/html; charset=iso-8859-1'.'\r\n';
$header.='From: admin@tophospit alsindia.com'.' \r\n';
$subj="Password Request";
$To=$_POST['txtemailid'];
$ms="<table><tr ><td>User Name</td><td>".$uname ."</td></tr><tr><td>Pass word</td><td>".$passw d."</td></tr></table>";
mail($To,$subj, $ms,$header);
$pwdmsg="Passwo rd will be sent to your mail!";
it is displaying one error msg "SMTP server error"
Comment