fix mail e converted video flag

This commit is contained in:
Francesco Picone
2025-12-09 17:15:54 +01:00
parent 59c9b1f5be
commit 91e4559bd2
6 changed files with 71 additions and 14 deletions

View File

@@ -471,7 +471,14 @@ function send_smtp_email($to, $subject, $message) {
if (SMTP_ENCRYPTION === 'tls') {
$send("STARTTLS");
$read();
stream_socket_enable_crypto($smtp, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
// Usa una versione più compatibile di TLS
$crypto_method = STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT;
if (!stream_socket_enable_crypto($smtp, true, $crypto_method)) {
error_log("SMTP Error: Impossibile avviare crittografia TLS");
fclose($smtp);
return false;
}
$send("EHLO " . SMTP_HOST);
$read();