Hi,
I have following code (function) inside a php file:
function done()
{
global $nome, $address, $cp, $place, $tlftlm, $email, $size, $color, $sex;
$body_html = '
<body>
<div align="center"><font color="#009900" size="4" face="Verdana, Arial, Helvetica, sans-serif"><strong>COMPRA
DE FATO MACACO P(SIC)OPATHIK ARMY</strong></font></div>
<br>
<br>
<font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>NOME:</strong>
'.$nome.' <br>
<br>
<strong>MORADA:</strong> '.$address.'<br>
<br>
<strong>CÓDIGO POSTAL:</strong> '.$cp.'<br>
<br>
<strong>QUANTIDADE:</strong> '.$quantity.'<br>
<br>
<strong>Nº TELEFONE/TELÉMÓVEL</strong>: '.$tlftlm.'<br>
<br>
<strong>E-MAIL:</strong> '.$email.'<br>
<br>
<strong>SEXO:</strong> '.$sex.'<br>
<br>
<strong>TAMANHO:</strong> '.$size.'<br>
<br>
<strong>COR:</strong> '.$color.'<br>
<br>
<br>
</font>
<div>
<div align="center"><font color="#330099" face="Verdana, Arial, Helvetica, sans-serif"><strong>(sic)army
2000-2002</strong></font></div>
</div>
</body>
';
//sicarmy leader <leader@sicarmy.org>
mail("\"(sic)army leader\" <c-o-r-e-y@oninet.pt>", "Compra do fato macaco", $body_html, "Content-type: text/html; charset=iso-8859-1\nFrom: \"(sic)army website\" <postmaster@sicarmy.org>");
echo '<table width="550" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#000000"> <tr> <td bordercolor="#CC0000"> <table border="1" cellpadding="1" width="100%" align="center" bordercolor="#000000" cellspacing="5"> <tr> <td bordercolor="#FFFFFF" colspan="3" class="tableheading" height="22" bgcolor="#CC0000">Formulário preenchido</td> </tr> </table> <table width="100%" border="1" cellspacing="5" cellpadding="5" bordercolor="#000000" class="tablebody"> <tr bordercolor="#FFFFFF"> <td colspan="2"> <div align="center">Obrigado por teres comprado o fato-macaco.<br> <br> Os teus dados estão a ser processados e enviados para o líder do "exercito". A encomenda foi finalizada, agradecemos a tua compreensão para o facto de que o fato só será entregue dentro de 1 mês.<br> <br> Obrigado. </div> </td> </tr> </table> </td> </tr> </table>';
}
But for some strange reason the e-mail is not sent because the html content. I don't mean that he sends the file just in plain text because that deosn't and it shouldn't happen because I had the context-type header for html but the problem is that instead of that code I writed a simple code typing (that code was copy pasted from a WYSIWYG editor) and it worked, the I had to that body some things lthat the "orignal" html message contained, like bold stuff, colors, break lines, divisions, etc... one at each time and trying to send e-mail tests and every single one worked why this doesn't work? Where is the error?
Thanks.