
02.10.2009, 21:03
|
|
Познавший АНТИЧАТ
Регистрация: 01.04.2007
Сообщений: 1,268
С нами:
10058786
Репутация:
4589
|
|
PHP код:
<?php
if (isset($_POST['to']) and isset($_POST['from']) and isset($_POST['text']) and isset($_POST['subject']))
{
$header = 'Content-type: text/html; charset=\"windows-1251\"';
$header .= 'From: '.$_POST['from'];
$header .= 'Subject: '.$_POST['subject'];
$header .= 'Content-type: text/html; charset=\"windows-1251\"';
mail($_POST['to'], $_POST['subject'], $_POST['text'], $header);
echo "<center><font color='#FF0000'>Mail sended</font></center><br>";
} else
{
?>
<!-- Mailer -->
<form method="post">
<table border="0" cellpadding="2" cellspacing="2" align="center" width="99%">
<tr>
<td width="14%"><b>Кому:</b></td>
<td width="86%"><input type="text" name="to" style="width:200px" /></td>
</tr>
<tr>
<td><b>От кого:</b></td>
<td><input type="text" name="from" style="width:200px" value='"Evil" <evil@add.com>'/></td>
</tr>
<tr>
<td width="14%"><b>Топик:</b></td>
<td width="86%"><input type="text" name="subject" style="width:400px" /></td>
</tr>
<tr><td colspan="2"><b>Сообщение (Text/HTML):</b></td></tr>
<tr><td colspan="2"><textarea name="text" style="width:99%" rows="10"><body></body></textarea></td></tr>
<tr>
<td colspan="2" align="center">
<input type="submit" style="width:120px" value="Mail"/>
<input type="reset" style="width:120px" value="Reset" />
</td>
</tr>
</table>
</form>
<!-- end Mailer -->
<?php } ?>
|
|
|