hola estoy usando la funcion mail para enviar un texto en fromato html
El cuerpo del texto lo tomo de un formulario, pero no puedo hacer que respete los saltos de linea
Código:
<?php
$sfrom="[email protected]"; //cuenta que envia
$sdestinatario="[email protected]"; //cuenta destino
$ssubject="Ministerio de Desarrollo Social de la Nación Informa"; //subject
$shtml="
<DIV align=center>
<TD bgColor=#000000 width= 800 >
<TABLE align=center height=900 width=617 border=0>
<TBODY>
<TR>
<TD bgColor=#ffffff>
<p align='center'>
<img src='http://ministerionoticias.net/logo.png' width='356' height='96' border='0'>
</p >
". $_POST['titulo'] ."
<p align='center'>
<img src='http://www.ministerionoticias.net/fotos/"
. $_POST['txtMensaje'] ."' width='552' border='0'>
</p >
<P> </P></TD></TR>
<TR>
<TD bgColor=#0070bc> </TD></TR>
<TR>
<TD vAlign=top bgColor=#ffffff height=554>
<p> </p>
<h3 >
"
$var_con_saltos_de_linea= $_POST['cuerpo'];
$var_con_br=nl2br($var_con_saltos_de_linea);
echo $var_con_br;
echo "\n<br>\n";
"
</h3>
</div>
</TD>
</TR>
<TR>
</TR>
<TR>
</TR>
</TBODY></TABLE>
</TD>
</DIV>" ;
$sheader="From:".$sfrom."\nReply-To:".$sfrom."\n";
$sheader=$sheader."X-Mailer:PHP/".phpversion()."\n";
$sheader=$sheader."Mime-Version: 1.0\n";
$sheader=$sheader."Content-Type: text/html";
mail($sdestinatario,$ssubject,$shtml,$sheader);
?>
Parse error: syntax error, unexpected T_VARIABLE in /home/minister/public_html/control/mail2.php on line 46
el error sobre esta linea
Código:
$var_con_saltos_de_linea= $_POST['cuerpo'];
Si alguien me puede orientar se lo agradeceria