function boletin_envio($asunto,$mensaje) {
global $pref,$db,$IndexUrl,$TituloWeb,$EmailWeb;
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$cuerpo = '<html><body>';
$cuerpo .="X: \n\n";
$cuerpo.="Asunto: $asunto \n";
$cuerpo.="Mensaxe: \n";
$cuerpo.="$mensaje \n\n";
$cuerpo.="$IndexUrl \n\n";
$cuerpo .= '</body></html>';
$sql = "SELECT X FROM ".$pref."X WHERE X='X'";
if($resultado = $db->sql_query($sql)) {
$total = $db->sql_numrows($resultado);
while($row = $db->sql_fetchrow($resultado)) {
mail("$row[Login]", "$asunto", "$cuerpo", "From: X <$EmailWeb>", "$headers");
}
$db->sql_freeresult($resultado);
}
echo ("<script>window.open('X','_self')</script>");
}
I have this code, and I'm trying to figure it out so it can work with html tags, I'm pretty sure I'm doing something wrong but don't know what. The user writes the message in a ckeditor.
` tags. Edit: (I deleted my previous comment similar to this, sorry). – Funk Forty Niner Oct 24 '19 at 16:11
except for the headers – JaneDoe Oct 24 '19 at 16:19