";
$mail->Body = $texto_html; //Cuerpo en HTML
// FIN PARTE HTML
// COMIENZO PARTE TEXTO PLANO
if (!$_POST["coment"]) { $comentario=""._T('enviarmail:enviado').""; } else { $comentario=$_POST["coment"]; }
$texto_plano=$comentario."\n\n";
$texto_plano.="-------------------------- \n";
$texto_plano.='[(#NOM_SITE_SPIP)]'."\n".'[(#URL_SITE_SPIP)]'."\n\n";
$texto_plano.='[(#TITRE)]'."\n\n";
$texto_plano.='[(#TEXTE|couper{1200})]'."\n\n";
$texto_plano.=""._T('enviarmail:leer')."".$url_sitio."/".$url_art."\n\n";
$texto_plano.="-------------------------- \n";
$texto_plano.=""._T('enviarmail:enviado_por')." ".$remite.$email_aut;
$mail->AltBody = $texto_plano;
// FIN PARTE TEXTO PLANO
// Envío (5 intentos)
$enviado = $mail->Send();
$intentos=1;
while((!$enviado)&&($intentos<5)&&($mail->ErrorInfo!="SMTP Error: Data not accepted")){
sleep(5);
//echo $mail->ErrorInfo;
$enviado = $mail->Send();
$intentos=$intentos+1;
}
if ($mail->ErrorInfo=="SMTP Error: Data not accepted") { // soluciona un bug con attachements
$enviado=true;
}
//información final sobre el envío
if($enviado)
{
echo "