HEX
Server: LiteSpeed
System: Linux php-prod-3.spaceapp.ru 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: sarli3128 (1010)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //proc/self/root/proc/thread-self/root/proc/self/root/home/retile.ru/public_html/smtp_test_mail.php
<?php
// Настройки SMTP
$smtp_host = 'smtp.timeweb.ru';
$smtp_port = 587; // STARTTLS порт
$smtp_user = 'cart@retile.ru';
$smtp_pass = 'G3pN3KX37';
$to_email = 'info@retile.ru';
$from_email = $smtp_user;
$from_name = 'OpenCart SMTP Test';
$subject = 'Тест SMTP OpenCart';
$message = '<p>Если вы видите это письмо — SMTP работает!</p>';

// Используем PHPMailer для корректной работы с STARTTLS
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require __DIR__ . '/vendor/autoload.php'; // подключаем PHPMailer через Composer

$mail = new PHPMailer(true);

try {
    // Настройки SMTP
    $mail->isSMTP();
    $mail->Host = $smtp_host;
    $mail->SMTPAuth = true;
    $mail->Username = $smtp_user;
    $mail->Password = $smtp_pass;
    $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // STARTTLS
    $mail->Port = $smtp_port;
    $mail->CharSet = 'UTF-8';

    // От кого
    $mail->setFrom($from_email, $from_name);

    // Кому
    $mail->addAddress($to_email);

    // Письмо
    $mail->isHTML(true);
    $mail->Subject = $subject;
    $mail->Body    = $message;

    $mail->send();
    echo "Письмо успешно отправлено на: $to_email";
} catch (Exception $e) {
    echo "Ошибка отправки письма: {$mail->ErrorInfo}";
}

die();