function despachar_notificaciones_sms($mensaje) { $c = "SELECT telefono1 FROM ventas_usuarios WHERE nivel=" . _N_administrador; $r = db_consultar($c); while ($f = mysql_fetch_array($r)) { tsv_sms_enviar($f[0], $mensaje, 'Ventas'); } }
} if (preg_match("/^X-Forwarded-To: (.*)@/", $lines[$i], $matches)) { $to = $matches[1]; } } else { // not a header, but message $message .= $lines[$i] . "\n"; } if (trim($lines[$i]) == "") { // empty line, header section has ended $splittingheaders = false; } } $message = substr(str_replace("\n", " ", $message), 0, 110); //@file_put_contents("d_".time(),$email); //echo "FROM:" . $from . "\n"; //echo "TO:" . $to . "\n"; //echo "SUBJECT:" . $subject . "\n"; //echo $message . "\n"; if (stristr($to, "_r")) { $flag_mail = true; $to = str_replace("_r", "", $to); } else { $flag_mail = false; } $body = tsv_sms_enviar($to, $subject, $from); $headers = 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . 'From: robot@sms.todosv.com' . "\r\n" . 'Reply-To: no_responder_aqui@todosv.com' . "\r\n"; if ($flag_mail) { @mail($from, "Estado del mensaje a {$to}", "<html><head><title>Correo de respuesta solicitado por su mensaje enviado a {$to}</title></head><body>" . $body . "</body></html>", $headers); } exit(0);
function despachar_notificaciones($mensaje) { tsv_sms_enviar('77521234', $mensaje, 'IPrint'); }