یه سوال در مورد ارسال ایمیل با php
salam dustan
man ino neveshtam vali vagti mail ersal mishe masalan man mikham ba email
[ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]
ersal kone vali email ferestandwe ro
[ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]
mizane chi kar konam baladi komakam koni
[PHP]<?php
if(isset($_POST["send"])){
$to = $_POST['to'];
$subject = $_POST['sub'];
$message = $_POST['S2'];
$headers = $_POST['from'];
$re = mail($to, $subject, $message, $headers);
}
if ($re) {print "پیام شما ارسال شد";}
?>[/PHP]
[HTML]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ارسال ایمیل</title>
<style type="text/css">
<!--
.style5 {font-family: tahoma; font-size: 12px; }
-->
</style>
</head>
<body>
<form method="POST" action="<?php print $_SERVER["PHP_SELF"]; ?>">
<div align="center"><table width="100%" align="center">
<tr>
<td width="8%"><span class="style5">From : </span></td>
<td width="92%"><span class="style5">
<select size="1" name="from">
<option value="admin@di7x.com">admin@di7x.com</option>
<option value="info@di7x.com">info@di7x.com</option>
<option value="support@di7x.com">support@di7x.com</option>
<option value="mpc.sharr@gmail.com">mpc.sharr@gmail.com</option>
<option value="m.-.p.-.c@att.net">m.-.p.-.c@att.net</option>
</select>
</span></td>
</tr>
<tr>
<td><span class="style5">To : </span></td>
<td><input name="to" type="text" size="50"></td>
</tr>
<tr>
<td><span class="style5">Subject : </span></td>
<td><input name="sub" type="text" size="40"></td>
</tr>
<tr>
<td><span class="style5">Message : </span></td>
<td><span class="style5">
<?php
if(isset($_GET["edit"])) $text = $long;
include "./fckeditor/fckeditor.php";
$oFCKeditor = new FCKeditor('S2') ;
$oFCKeditor->BasePath = './fckeditor/' ;
$oFCKeditor->Value = $text;
$oFCKeditor->Width = 550;
$oFCKeditor->Height = 300;
$oFCKeditor->Config['ContentLangDirection'] = 'rtl';
$oFCKeditor->Config['AutoDetectLanguage'] = false;
$oFCKeditor->Config['DefaultLanguage'] = 'en';
$oFCKeditor->ToolbarSet = 'Default';
$oFCKeditor->Create() ;
?>
</span></td>
</tr>
<tr>
<td><br><input name="send" type="submit" value="send"></td>
<td> </td>
</tr>
</table>
</div>
</form>
</body>
</html>
[/HTML]