ob_start(); echo $mensaje; $mensaje = ob_get_contents(); ob_end_clean(); mail("","", $mensaje,"cabecera");