Укажите правильный ответ для кода защиты от спама!!!';
}
}
if ($ok) // все ок, отправляем
{
$myemail = 'info@coffeemoll.ru'; // с какого адреса отправляем
$email = 'busel@cosmostv.by'; // куда приходят письма
$ip = getenv("REMOTE_ADDR");
$Sender_HOST = gethostbyaddr("$ip");
$Sender_Time=date("H.i");
$Sender_Date=date("j.m.Y");
$subject = $_POST['contact_subject'];
$header = 'From: ' . $myemail;
$text_email .= 'Тема письма: ' . $_POST['contact_subject'] . "\n\n";
$text_email .= 'Ваше имя: ' . $_POST['contact_name'] . "\n";
$text_email .= 'Email: ' . $_POST['contact_mail'] . "\n";
$text_email .= 'Телефон: ' . $_POST['contact_phone'] . "\n";
$text_email .= 'Страна, город: ' . $_POST['contact_city'] . "\n\n";
$text_email .= 'Ваше сообщение: ' . $_POST['contact_message'] . "\n\n";
$message = $text_email .= $_POST[''];
$text_email = "Дата: $Sender_Date ($Sender_Time) \nIP-адрес: $ip ($Sender_HOST) \n\n" . $text_email ;
$form_hide = @mail($email, $subject, $text_email, $header);
if ( isset($_POST['subscribe']) and $_POST['subscribe'])
@mail($_POST['contact_mail'], $subject, $text_email, $header);
echo 'Ваше сообщение отправлено!'
. str_replace("\n", ' ', htmlspecialchars("" . $message))
. '';
$form_hide = true;
}
else
{
// неверные данные
echo 'Нужно указать корректные данные и действительный адрес электронной почты!!!';
}
}
if ( !$form_hide ) :
srand((double) microtime() * 1000000);
$antispam1 = rand(1, 10);
$antispam2 = rand(1, 10);
?>
|