I used this php code to send the mail
its working sometimes and not working sometimes.
can anyone help me please..............
Code: Select all
<?php $to=$_POST['email'];
$from="admin@6sts.com";
$header.= "From:".$from."\r\n";
$header.= "Content-Type: text/html\r\n\r\n";
$mesg = "<html>
<body><font size = 2 face=verdana>
<br>";
$mesg.='<table width="450" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="400" align="left" valign="top" class="mainbgcolor"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="mini_inerbg">
<tr>
<td width="44%" height="100" align="left" valign="middle" style="padding-left:25px;"><img src="images/mini_logo.jpg" width="212" height="77" /></td>
<td width="56%"> </td>
</tr>
<tr>
<td height="24" colspan="2" align="left" bgcolor="#D5E5EE" class="firstkolam" ><span class="forgotheading">Hi '.$_POST['fname'].' '.$_POST['lname'].'! </span></td>
</tr>
<tr>
<td height="250" colspan="2" align="left" valign="top"><table width="520" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top"><br />
<p style="border-bottom:#999999 1px solid;"><br />
Welcome to 6students.com! <br/><br />Please keep this e-mail for your records. Your account information is as
follows:<br /><br /></p>
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30%" height="30">User Name: </td>
<td width="70%">'.$_POST['user'].'</td>
</tr>
<tr>
<td height="30">Password:</td>
<td>'.$_POST['pwd'].'</td>
</tr>
<tr>
<td height="40" colspan="2">To login into 6students.com.please click <a href="javascript:;">here</a></td>
</tr>
</table>
<p>Thanks & regards, </p></td>
</tr>
<tr>
<td align="left" valign="top"> 6students.com </td>
</tr>
<tr>
<td align="left" valign="top"> </td>
</tr>
<tr>
<td align="left" valign="top">Contact Us: </td>
</tr>
<tr>
<td align="left" valign="top"><a href="javascript:;">click here to contact us</a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></font></body></html>';
mail($to,"Login details",$mesg,$header);
?>