Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Vitor S

Função Mail da Coluna PHP

Recommended Posts

Pessoal,Verifiquei o código e não consigo que funcione normalmente. A mensagem que recebo sempre é a seguinte:Para: <b>Vitor S. Rodrigues</b>,<br><br>Teste de envio de email para testar o php função mailquando era pra se receber em negrito e quebrar a linha mais isso naum acontece, poderiam me dizer onde está o erro?Segue o código abaixo, os valores mensagem e email são pegos no form. <? $email_dest = "vitor@portalbangu.com.br"; $nome_dest = "Vitor S. Rodrigues"; if($mandar == 's') { //Rotina que envia o email conforme os parâmetros informados $nome = "Para: <b>$nome_dest</b>,<br><br>"; mail($email_dest,"Fale Conosco - Felice",$nome.$mensagem,"From:$email Content-Type: text/html; charset=iso-8859-1"); echo "<br><br><div align=center><font face=Verdana size=2>E-mail enviado com SUCESSO!</font></div>"; } ?>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Tenta esse codigo aqui:

<?

if (!$nome || !$email || !$cidade || !$assunto || !$comentario) {

$erro = 1;

}

if (!$erro) {

$menssagem = "\tContato pelo meu site.\r\n\t".

"Data: ". date("d/F/Y G:i").

"\r\n------------- dados do visitante -------------

\r\n Nome: $nome

\r\n e-mail: $email

\r\n cidade: $cidade    estado: $estado

\r\n

\r\n ------------- Menssagem -------------

\r\n

\r\n Assunto: $assunto

\r\n

\r\n Comentario:

\r\n\t $comentario

\r\n

\r\n------------- Fim ------------";

mail("COLOQUE SEU EMAIL AQUI","COLOQUE O TITULO DO EMAIL",$menssagem);

}

function sucesso(){

?>

<html>

<head>

<title>Titulo do site</title>

<meta http-equiv="Content-Type" content="text/html;">

<STYLE>

:link   {color: #666666; text-decoration: none;}

:visited   {color: #666666; text-decoration: none;}

:hover   {color: #000000; text-decoration: underline;}

</STYLE>

<STYLE>

:link   {color: #666666; text-decoration: none;}

:visited   {color: #666666; text-decoration: none;}

:hover   {color: #000000; text-decoration: underline;}

</STYLE>

<style type="text/css">

<!--

.Menu {

font-family: Tahoma;

font-size: 11px;

}

-->

</style>

<style type="text/css">

<!--

.Form {

font-family: Tahoma;

font-size: 10px;

color: #666666;

background-color: #F4F4F4;

}

-->

</style>

<meta name="generator" content="Namo WebEditor v5.0(Trial)">

</head>

<body bottommargin="0" leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" topmargin="0" bgcolor="#ffffff" onLoad="MM_preloadImages('CEU2/QuemSomos_f2.gif','CEU2/index_r4_c6_f2.gif','CEU2/index_r4_c8_f2.gif','CEU2/index_r4_c10_f2.gif','CEU2/index_r4_c13_f2.gif','images/QuemSomos_f2.gif');">

<table width="90%" border="0" align="center">

<tr>

    <td width="90%"><div align="center">

        <p><br>

          <font color="#333333" size="2" class="Menu"><strong>Seu formulário

          foi enviado com sucesso, aguarde.<br>

          Pois em breve entraremos em contato com você.<br>

          Obrigado</strong></font></p>

        <p> </p>

  <p> </p>

      </div>

       </td>

    <td width="16"> </td>

  </tr>

  <tr>

    <td> </td>

    <td> </td>

  </tr>

</table>

<? }

?>

<!-- Fireworks MX Dreamweaver MX target.  Created Fri May 02 01:11:34 GMT-0300 (Hora padrão leste da Am. Sul) 2003-->

<script language="JavaScript">

<!--

function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}

function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;

}

function MM_preloadImages() { //v3.0

var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

   if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}

}

function mmLoadMenus() {

  if (window.mm_menu_0427233816_1) return;

      window.mm_menu_0427233816_1 = new Menu("root",92,12,"Verdana, Arial, Helvetica, sans-serif",10,"#000000","#000000","#FFFFFF","#CCCCCC","center","middle",0,0,1000,-5,7,true,true,true,0,false,false);

  mm_menu_0427233816_1.addMenuItem("Concursos","location='concursos.htm'");

  mm_menu_0427233816_1.addMenuItem("Moradores","location='moradores.htm'");

   mm_menu_0427233816_1.fontWeight="bold";

   mm_menu_0427233816_1.hideOnMouseOut=true;

   mm_menu_0427233816_1.bgColor='#000000';

   mm_menu_0427233816_1.menuBorder=1;

   mm_menu_0427233816_1.menuLiteBgColor='#FFFFFF';

   mm_menu_0427233816_1.menuBorderBgColor='#777777';

window.mm_menu_0427234059_2 = new Menu("root",92,12,"Verdana, Arial, Helvetica, sans-serif",10,"#000000","#000000","#FFFFFF","#CCCCCC","center","middle",0,0,1000,-5,7,true,true,true,0,false,false);

  mm_menu_0427234059_2.addMenuItem("Administrativo","location='ca.htm'");

  mm_menu_0427234059_2.addMenuItem("Deliberativo","location='cd.htm'");

  mm_menu_0427234059_2.addMenuItem("Curadores","location='cc.htm'");

  mm_menu_0427234059_2.addMenuItem("Departamentos","location='dp.htm'");

   mm_menu_0427234059_2.fontWeight="bold";

   mm_menu_0427234059_2.hideOnMouseOut=true;

   mm_menu_0427234059_2.bgColor='#000000';

   mm_menu_0427234059_2.menuBorder=1;

   mm_menu_0427234059_2.menuLiteBgColor='#FFFFFF';

   mm_menu_0427234059_2.menuBorderBgColor='#777777';

mm_menu_0427234059_2.writeMenus();

} // mmLoadMenus()

//-->

</script>

<script language="JavaScript1.2" src="CEU2/mm_menu.js"></script>

<script language="JavaScript1.2">mmLoadMenus();</script>

<table width="775" align="center" bgcolor="#CCCCCC">

  <tr>

    <td> <table bgcolor="#FFFFFF" width="774" align="center">

        <tr>

          <td><table border="0" cellpadding="0" cellspacing="0" width="770">

              <!-- fwtable fwsrc="menu.png" fwbase="index.gif" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->

              <tr>

                <td><img src="images/spacer.gif" width="48" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="48" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="134" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="66" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="30" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="11" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="96" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="11" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="96" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="9" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="8" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="39" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="49" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="9" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="28" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="68" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="20" height="1" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td>

              </tr>

              <tr>

                <td rowspan="4"><img name="index_r1_c1" src="images/index_r1_c1.gif" width="48" height="123" border="0" alt=""></td>

                <td rowspan="4"><img name="index_r1_c2" src="images/index_r1_c2.gif" width="48" height="123" border="0" alt=""></td>

                <td rowspan="2" colspan="2"><img name="index_r1_c3" src="images/index_r1_c3.gif" width="200" height="46" border="0" alt=""></td>

                <td rowspan="3" colspan="7"> </td>

                <td rowspan="4"><img name="index_r1_c12" src="images/index_r1_c12.gif" width="39" height="123" border="0" alt=""></td>

                <td colspan="3"><img name="index_r1_c13" src="images/index_r1_c13.gif" width="86" height="26" border="0" alt=""></td>

                <td rowspan="3" colspan="2"><img name="index_r1_c16" src="images/index_r1_c16.gif" width="88" height="78" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="1" height="26" border="0" alt=""></td>

              </tr>

              <tr>

                <td rowspan="2" colspan="3"><img name="index_r2_c13" src="images/index_r2_c13.gif" width="86" height="52" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="1" height="20" border="0" alt=""></td>

              </tr>

              <tr>

                <td colspan="2"><img name="index_r3_c3" src="images/index_r3_c3.gif" width="200" height="32" border="0" alt=""></td>

                <td><img src="images/spacer.gif" width="1" height="32" border="0" alt=""></td>

              </tr>

              <tr>

                <td colspan="9"><img name="index_r4_c3" src="images/index_r4_c3.gif" width="461" height="45" border="0" alt=""></td>

                <td colspan="5"> </td>

                <td><img src="images/spacer.gif" width="1" height="45" border="0" alt=""></td>

              </tr>

              <tr>

                <td rowspan="3" colspan="3"><img name="index_r5_c1" src="images/index_r5_c1.gif" width="230" height="17" border="0" alt=""></td>

                <td colspan="2"><a href="institucional.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('QuemSomos','','images/QuemSomos_f2.gif',1)"><img name="QuemSomos" src="images/QuemSomos.gif" width="96" height="15" border="0" alt=""></a></td>

<td rowspan="3"><img name="index_r5_c6" src="images/index_r5_c6.gif" width="11" height="17" border="0" alt=""></td>

<td><a href="moradia.htm" onMouseOut="MM_swapImgRestore();MM_startTimeout();" onMouseOver="MM_swapImage('index_r5_c7','','images/index_r5_c7_f2.gif',1)"><img name="index_r5_c7" src="images/index_r5_c7.gif" width="96" height="15" border="0" alt=""></a></td>

<td rowspan="3"><img name="index_r5_c8" src="images/index_r5_c8.gif" width="11" height="17" border="0" alt=""></td>

<td><a href="hospedagem.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('index_r5_c9','','images/index_r5_c9_f2.gif',1)"><img name="index_r5_c9" src="images/index_r5_c9.gif" width="96" height="15" border="0" alt=""></a></td>

<td rowspan="3"><img name="index_r5_c10" src="images/index_r5_c10.gif" width="9" height="17" border="0" alt=""></td>

<td rowspan="2" colspan="3"><a href="diretoria.htm" onMouseOut="MM_swapImgRestore();MM_startTimeout();" onMouseOver="MM_swapImage('index_r5_c11','','images/index_r5_c11_f2.gif',1)"><img name="index_r5_c11" src="images/index_r5_c11.gif" width="96" height="16" border="0" alt=""></a></td>

<td rowspan="3"><img name="index_r5_c14" src="images/index_r5_c14.gif" width="9" height="17" border="0" alt=""></td>

<td colspan="2"><a href="contato.php"><img name="index_r5_c15" src="images/index_r5_c15.gif" width="96" height="15" border="0" alt=""></a></td>

<td rowspan="3"><img name="index_r5_c17" src="images/index_r5_c17.gif" width="20" height="17" border="0" alt=""></td>

<td><img src="images/spacer.gif" width="1" height="15" border="0" alt=""></td>

</tr>

<tr>

<td rowspan="2" colspan="2"><img name="index_r6_c4" src="images/index_r6_c4.gif" width="96" height="2" border="0" alt=""></td>

<td rowspan="2"><img name="index_r6_c7" src="images/index_r6_c7.gif" width="96" height="2" border="0" alt=""></td>

<td rowspan="2"><img name="index_r6_c9" src="images/index_r6_c9.gif" width="96" height="2" border="0" alt=""></td>

<td rowspan="2" colspan="2"><img name="index_r6_c15" src="images/index_r6_c15.gif" width="96" height="2" border="0" alt=""></td>

<td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td>

</tr>

<tr>

<td colspan="3"><img name="index_r7_c11" src="images/index_r7_c11.gif" width="96" height="1" border="0" alt=""></td>

<td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td>

<br>

</tr>

</table>

<table width="770" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="140" valign="top" bgcolor="#F7F7F7"><table width="140" border="0" cellspacing="0" cellpadding="0">

<tr>

<td bgcolor="#CCCCCC" class="Menu"><strong> > Contato</strong></td>

</tr>

<tr>

<td height="1" bgcolor="#CCCCCC" class="Menu"> </td>

</tr>

<tr>

<td height="1" bgcolor="#CCCCCC"></td>

</tr>

</table>

<center>

<br>

<object border="1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="120" height="80">

<param name="movie" value="images/ajuda.swf">

<param name="quality" value="high">

<embed src="images/ajuda.swf" width="120" height="80" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object>

</center>

<br> <br> </td>

<td width="1" bgcolor="#CCCCCC">

</td>

<td width="492" valign="top"> <table width="480" height="189" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td valign="top"><table width="472" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCFF00">

<tr>

<td bgcolor="#CCCCCC" class="Menu"><strong>Converse com a gente...</strong></td>

</tr>

<tr>

<td bgcolor="#F9F9F9" class="Menu"> <table width="465" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td width="85" height="1">

</td><td width="380" height="2" valign="top"> </td>

</tr>

<tr>

<td colspan="2">

<?

if(!$erro) {

sucesso();

} else {

echo  '<table width="90%" border="0" align="center">

<tr>

<td width="90%"><div align="center"><br>

<font size="2" class="Menu"><strong>Por

favor, preencha o formulário abaixo.<br>

Não esqueça de preencher todos os campos.</strong></font></div>

<table width="95%"  border="0" align="center" bgcolor="#CCCCCC">

<tr>

<td><table width="100%"  border="0" align="center" bgcolor="#FFFFFF">

<tr>

<td colspan="2"><font color="#333333" size="2"><strong>

</strong></font>

<form action="'.$PHP_SELF.'" method="post" name="formulario" id="formulario">

<font face="Verdana"><b><span style="font-size:10pt;">';

if (!$nome){

echo '<strong><font color="#333333" size="2" class="Menu">Nome:<br>';

} else {

echo '<strong><font color="#FF0033" size="2" class="Menu">Nome:<br>' ;

}

echo '  <input name="nome" type="text" id="nome" size="40" maxlength="50" style="font-family:verdana;font-size:10px;color:#000000;background:#ffffff;border-whidth:1px;border-style:solid;border-color:#CCCCCC">

<br>

<br>';

if (!$email) {

echo '<font color="#333333" size="2" class="Menu">E-mail:</font>';

} else {

echo '<font color="#FF0033" size="2" class="Menu">E-mail:</font>';

}

echo'    <br>

<input name="email" type="text" id="email" size="40" maxlength="50" style="font-family:verdana;font-size:10px;color:#000000;background:#ffffff;border-whidth:1px;border-style:solid;border-color:#CCCCCC">

</font></strong> <br>

<br><strong><font color="#333333" size="2" class="Menu">Telefone:<br>

<input name="telefone" type="text" id="telefone" size="15" maxlength="15" style="font-family:verdana;font-size:10px;color:#000000;background:#ffffff;border-whidth:1px;border-style:solid;border-color:#CCCCCC">

<br>

<br>

</font></strong>

<table width="100%"  border="0">

<tr>

<td width="27%"><strong>';

if (!$cidade) {

echo '<font color="#333333" size="2" class="Menu">Cidade:</font></strong></td>';

} else {

echo '<font color="#FF0033" size="2" class="Menu">Cidade:</font></strong></td>';

}

echo ' <td width="73%"><font color="#333333" size="2" class="Menu"><strong>Estado:</strong></font></td>

</tr>

<tr>

<td><strong><font color="#333333" size="2" class="Menu">

<input name="cidade" type="text" id="cidade" size="20" maxlength="50" style="font-family:verdana;font-size:10px;color:#000000;background:#ffffff;border-whidth:1px;border-style:solid;border-color:#CCCCCC">

</font></strong></td>

<td> <select name="estados" style="font-family:verdana;font-size:12px;color:#000000;background:#ffffff;border-whidth:1px;border-style:solid;border-color:#CCCCCC">

<option value="AC">AC</option>

<option value="AL">AL</option>

<option value="AM">AM</option>

<option value="BA">BA</option>

<option value="CE">CE</option>

<option value="DF">DF</option>

<option value="ES">ES</option>

<option value="GO">GO</option>

<option value="MA">MA</option>

<option value="MG">MG</option>

<option value="MS">MS</option>

<option value="MT">MT</option>

<option value="PA">PA</option>

<option value="PB">PB</option>

<option value="PE">PE</option>

<option value="PI">PI</option>

<option value="PR">PR</option>

<option value="RJ">RJ</option>

<option value="RN">RN</option>

<option value="RO">RO</option>

<option value="RR">RR</option>

<option value="RS">RS</option>

<option value="SC">SC</option>

<option value="SP">SP</option>

<option value="TO">TO</option>

</select> </td>

</tr>

<tr>

</tr>

</table>

<strong>';

if (!$assunto) {

echo '<font color="#333333" size="2" class="Menu"><br>Assunto:<br>';

} else {

echo '<font color="#FF0033" size="2" class="Menu"><br>Assunto:<br>';

}

echo '  <input name="assunto" type="text" id="assunto" size="40" maxlength="50" style="font-family:verdana;font-size:10px;color:#000000;background:#ffffff;border-whidth:1px;border-style:solid;border-color:#CCCCCC">

<br>

<br>';

if (!$comentario) {

echo '<font color="#333333" size="2" class="Menu">Comentários:</font>';

} else {

echo '<font color="#FF0033" size="2" class="Menu">Comentários:</font>';

}

echo '  <br>

<textarea name="comentario" cols="40" rows="8" id="comentario" style="font-family:verdana;font-size:10px;color:#000000;background:#ffffff;border-whidth:1px;border-style:solid;border-color:#CCCCCC"></textarea>

<input name="enviar" type="submit" id="enviar" value="Enviar" style="font-family:Verdana; font-style:normal; font-weight:normal; font-size:8pt; color:black; margin:6pt; padding:0pt; border-color:rgb(153,153,153);">

</font></strong>

</form>

</td>

</tr>

</table></td>

</tr>

</table>

<br>

</td>

<td></td>

</tr>

<tr>

<td> </td>

<td> </td>

</tr>

</table>';

} // fim else

?>

<p align="right"><font color="#666666" size="2"><a href="index.htm">Página

Inicial</a></font></p></td>

</tr>

</table></td>

</tr>

</table>

<div align="center"></div></td>

</tr>

</table>

<div align="center"></div></td>

<td width="1" bgcolor="#999999">

</td><td width="163" valign="top" bgcolor="#F7F7F7"> <div align="center">

<table width="142" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCFF00">

<tr>

<td width="142" bgcolor="#CCCCCC" class="Menu"> <div align="center"><strong> COLABORADORES</strong></div></td>

</tr>

<tr>

<td bgcolor="#F9F9F9" class="Menu">  </td>

</tr>

</table>

<object border="1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="130" height="70">

<param name="movie" value="images/incepa.swf">

<param name="quality" value="high">

<embed src="images/incepa.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="130" height="70"></embed></object>

<br>

<br>

<object border="1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="130" height="70">

<param name="movie" value="images/ebs.swf">

<param name="quality" value="high">

<embed src="images/ebs.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="130" height="70"></embed></object>

<br>

<br>

<br>

</div></td>

</tr>

</table>

<table width="770" border="0" background="CEU2/fundotab.gif">

<tr>

<td background="images/fundotab.gif"> <div align="center"><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>©

Fundação Casa do Estudante Universitário

do Paraná - Gestão 2003</strong></font></div></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table>

</body>

</html>

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.