Lisää error_log lomakkeen sähköpostilähetykseen debug-tarkoitukseen

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 09:08:47 +02:00
parent d2280420ea
commit 2e58865f66

View File

@@ -82,7 +82,9 @@ $headers .= "Content-Type: text/plain; charset=UTF-8\r\n";
$headers .= "X-Mailer: Cuitunet-Web\r\n"; $headers .= "X-Mailer: Cuitunet-Web\r\n";
// Lähetys // Lähetys
$sent = mail($to, $subject, $body, $headers); error_log("cuitunet.fi send.php: Lähetetään posti osoitteeseen $to, aihe: $subject");
$sent = @mail($to, $subject, $body, $headers);
error_log("cuitunet.fi send.php: mail() palautti: " . ($sent ? 'true' : 'false') . ", error: " . error_get_last()['message'] ?? 'none');
if ($sent) { if ($sent) {
// Tallenna rate limit // Tallenna rate limit