В рабочем состоянии код php выглядит так:
<?php
if (isset($_POST['name'])) {$name = $_POST['name'];}
if (isset($_POST['email'])) {$email = $_POST['email'];}
if (isset($_POST['sub'])) {$sub = $_POST['sub'];}
if (isset($_POST['body'])) {$body = $_POST['body'];}
$address = "v.arsentyev@gmail.com";
$mes = "Имя: $name \nE-mail: $email \nТема: $sub \nТекст: $body";
$send = mail ($address,$sub,$mes,"Content-type:text/plain; charset = windows-1251\r\nFrom:$email");
if ($send == 'true')
{
echo "Сообщение отправлено";
}
else
{
echo "Сообщение не отправлено";
}
?>
Форма на сайте выглядит так:
</div>
<div id="title">
<form method="post" action="send.php">
Email: </textarea><input name="email" type="text"><br>
<input type="submit" value=" Subscribe to NEWS " class="inputbutton">
</form>
</div>
Заранее спасибо!