این فایل اول تون که با هر اسمی می خوای ذخیره کن (index.html)
<!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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="mail.php">
<p>
<label for="textfield2">موضوع : </label>
<input type="text" name="name" id="name" />
</p>
<p>
<label for="massage">پیغام شما : </label>
<textarea name="massage" id="massage" cols="45" rows="5"></textarea>
</p>
</form>
</body>
</html>
اینم فایل دوم که با نام mail.php ذخیره کن
و ایمیل خودت رو جای yourmail@xxxxxx.ir بنویس
<!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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
$mail='yourmail@xxxxx.ir';
$sender=$_POST['name'];
$massage=$_POST['massage'];
mail($mail,$sender,$massage);
?>
</body>
</html>





پاسخ با نقل قول