nhockien1986
08-07-2010, 10:58
Các anh bro cho em hỏi tại sao em cài thằng smtp và cấu hình smtp rùi sao lại gữi mail ko đc, anh nào bik thì xin giúp đở e dùm,thanks!
code:
if (isset($_REQUEST['email']))
{
$email = $_REQUEST['email'] ;
$to = $_REQUEST['to'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
mail( $to, "Subject: $subject",$message );
echo "sendmail sucess";
}
else
{
echo "<form method='post' action='sendmail.php'>
Ngu?i g?i: <input name='email' type='text' /><br />
G?i t?i: <input name='to' type='text' /><br />
Tiêu d?: <input name='subject' type='text' /><br />
N?i dung:<br />
<textarea name='message' rows='15' cols='40'>
</textarea><br />
<input type='submit' value='Ok'/>
</form>";
}
code:
if (isset($_REQUEST['email']))
{
$email = $_REQUEST['email'] ;
$to = $_REQUEST['to'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
mail( $to, "Subject: $subject",$message );
echo "sendmail sucess";
}
else
{
echo "<form method='post' action='sendmail.php'>
Ngu?i g?i: <input name='email' type='text' /><br />
G?i t?i: <input name='to' type='text' /><br />
Tiêu d?: <input name='subject' type='text' /><br />
N?i dung:<br />
<textarea name='message' rows='15' cols='40'>
</textarea><br />
<input type='submit' value='Ok'/>
</form>";
}