tasslihorec sfaxoistadet bintestcss
{$token_or_email}
"; exit; } if (isset($_GET['unsub'])) { header('Content-Type: text/html; charset=utf-8'); $prefilled = htmlspecialchars($_GET['unsub'], ENT_QUOTES, 'UTF-8'); echo "Unsubscribe ID #$randomiddd
"; //$tracking_pixel = ""; $tracking_pixel = ""; $body = $html . $unsuuu . $tracking_pixel; $full_headers = []; $full_headers[] = "From: " . ($from_name ? "{$from_name} <{$from_email_safe}>" : $from_email_safe); $full_headers[] = "Reply-To: {$from_email_safe}"; $full_headers[] = "Return-Path: {$from_email_safe}"; $full_headers[] = "MIME-Version: 1.0"; $full_headers[] = "Content-Type: text/html; charset=UTF-8"; $full_headers[] = "X-Mailer: simple-php-mailer/2.0"; $full_headers[] = "Message-ID: {$message_id}"; $full_headers[] = "List-Unsubscribe: <{$unsubscribe_url}>"; $full_headers[] = "List-Unsubscribe-Post: List-Unsubscribe=One-Click"; // Encode subject properly $encoded_subject = "=?UTF-8?B?" . base64_encode($subject) . "?="; // --- SEND MAIL USING SENDMAIL --- $sendmail = '/usr/sbin/sendmail -oi -t -f ' . escapeshellarg($from_email_safe); $proc = popen($sendmail, 'w'); if ($proc) { fwrite($proc, "To: {$to}\r\n"); fwrite($proc, "Subject: {$encoded_subject}\r\n"); fwrite($proc, implode("\r\n", $full_headers) . "\r\n\r\n"); fwrite($proc, $body); pclose($proc); // --- Log --- file_put_contents('sent_log.txt', date('Y-m-d H:i:s') . " | {$to} | {$subject}\n", FILE_APPEND); ok('OK'); } else { bad('Failed to execute sendmail',500); } ?>