Просмотр поста #60717: >>>ВОПРОСЫ НОВИЧКОВ<<<

.
ДоХтор

Easy, я наконец-то разобрался! (( ))
Хоть и убил пол вечера, но радостно Даже дополнил эти два файла несколькими тегами для удобной навигации.
Вот листинги файлов этого скрипта:

Листинг 1.(index.php)

<?

define('_IN_JOHNCMS', 1);
$textl ='Отправка E-mail';
$rootpath ='../';
require_once ("../incfiles/core.php"); 
require_once ("../incfiles/head.php"); 

echo'<form action="mail.php" method="POST"/>';
echo'<div class="menu">Адрес:</div><br/>';
echo'<input type="text" name="adress"/><br/>';
echo'<div class="menu">Текст:</div><br/>';
echo'<input type="text" name="msg"/><br/>';
echo'<input type="submit" value="Отправить"/>';

require_once ("../incfiles/end.php");

?>


Листинг 2.(mail.php)
<?

define('_IN_JOHNCMS', 1);
$textl ='Отправка E-mail';
$rootpath ='../';
require_once ("../incfiles/core.php"); 
require_once ("../incfiles/head.php"); 

error_reporting(0);
$adress = $_POST['adress'];
$msg = $_POST['msg'];
if(empty($adress)){
echo'<div class="menu"><b><font color="red">Введите адрес!</font></b></div>';
echo'<a href="../mess/index.php">Назад</a>';
} else {
echo'<div class="menu"><b><font color="red">Письмо отправлено!</font></b></div>';
echo'<a href="../mess/index.php">Написать ещё</a>';
}

require_once ("../incfiles/end.php");

mail($adress, '=?utf-8?B?'.base64_encode($msg).'?=', $msg ,"Content-type:text/html; charset=utf-8;")

?>