Files
redl-gamepanel/panel/engine/libs/mail.php
T
redl 6ee2744e3a Сборка REDL: панель на PHP 8, капча-тумблер, закрытые уязвимости, установщики в один клик
- панель работает на PHP 8.4 (оригинал под PHP 7.0): elFinder utf8_encode, apache_get_modules, warnings
- капча выключена и управляется из админки (флаг captcha_enable + блок настроек)
- закрыты две SQL-инъекции без авторизации (createAuthLog: пароль из POST и CF-Connecting-IP)
- убрано хранение паролей в открытом виде в authlog, XSS в поле ref
- установщики install-panel.sh и install-node.sh (оригинальный затирал sources.list репозиториями Debian 9)
- современный Dockerfile (оригинальный на debian:stretch больше не собирается)
- планировщик и автозапуск работают без systemd
- брендинг REDL.IO, год 2026, ссылки на redl.io
- документация на русском: ИЗМЕНЕНИЯ, БЕЗОПАСНОСТЬ, ИНСТРУКЦИЯ
2026-07-30 02:00:01 +00:00

72 lines
1.6 KiB
PHP

<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
class mailLibrary {
protected $to;
protected $from;
protected $sender;
protected $subject;
protected $text;
public function setTo($to) {
$this->to = $to;
}
public function setFrom($from) {
$this->from = $from;
}
public function setSender($sender) {
$this->sender = $sender;
}
public function setSubject($subject) {
$this->subject = $subject;
}
public function setText($text) {
$this->text = $text;
}
public function send() {
if (!$this->to) {
exit("Ошибка: Не указан E-Mail получателя!");
}
if (!$this->from) {
exit("Ошибка: Не указан E-Mail отправителя!");
}
if (!$this->sender) {
exit("Ошибка: Не указано имя отправителя!");
}
if (!$this->subject) {
exit("Ошибка: Не указана тема сообщения!");
}
if (!$this->text) {
exit("Ошибка: Не указан текст сообщения!");
}
if (is_array($this->to)) {
$this->to = implode(',', $this->to);
}
$header = "";
$header .= "MIME-Version: 1.0\n";
$header .= "From: " . $this->sender . "<" . $this->from . ">\n";
$header .= "Reply-To: " . $this->sender . "\n";
$header .= "X-Mailer: HOSTINPL 5.6 Mailer\n";
$header .= "Return-Path: " . $this->sender . "\n";
$header .= "Content-Type: text/html; charset=\"utf-8\"\n";
return mail($this->to, $this->subject, $this->text, $header);
}
}
?>