دوست عزیز
اینم یه نمونه دیگه با php
<?php
if(isset($_POST['btnSubmit']))
{
$fname=$_POST['fname'];
$lname=$_POST['lname'];
$tel=$_POST['tel'];
//**************************************************
$HTML = "First Name=$fname,Last Name=$lname,Tel=$tel";
$from = "info@abc.com";
$to = "ali@abc.com";
$subject = "Registration";
$headers = "From: $from\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$boundary = uniqid("HTMLEMAIL");
$headers .= "Content-Type: multipart/alternative;".
"boundary = $boundary\r\n\r\n";
$headers .= "This is a MIME encoded message.\r\n\r\n";
$headers .= "--$boundary\r\n".
"Content-Type: text/plain; charset=ISO-8859-1\r\n".
"Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split(base64_encode(strip_tags($HTML)));
$headers .= "--$boundary\r\n".
"Content-Type: text/html; charset=ISO-8859-1\r\n".
"Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split(base64_encode($HTML));
$success=mail($to,$subject,"",$headers);
//************************************************** ************
if (!$success)
{
echo '<br><br><center>';
echo '<font face=Verdana size=2 color=red>Not OK</font>';
echo '</center>';
echo ("<META HTTP-EQUIV=Refresh CONTENT=\"2; URL=$_SERVER[PHP_SELF]\">");
}
else
{
echo '<script>';echo "alert('OK')"; echo '</script>';
echo ("<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=$_SERVER[PHP_SELF]\">");
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>First Name</title>
</head>
<body>
<div>
<form action="" method="post">
<table align="center" style="width: 300px">
<tr>
<td>First Name:</td>
<td><input name="fname" type="text" /></td>
</tr>
<tr>
<td>Last Name:</td>
<td><input name="lname" style="height: 22px" type="text" /></td>
</tr>
<tr>
<td>Tel:</td>
<td><input name="tel" type="text" /></td>
</tr>
<tr>
<td> </td>
<td><input name="btnSubmit" type="submit" value="submit" /></td>
</tr>
</table>
</form>
</div>
</body>
</html>
من به صورت خیلی ساده این برنامه رو نوشتم (همه فیلدها رو هم در ضمن ننوشتم)
اگر توضیح بیشتری خواستید بگید.
موفق باشید