Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Boa tarde pessoal, estou fazendo um formulario onde o usuario seleciona o departamento, ao encaminhar o formulario apenas o departamento selecionado recebe o e-mail, o problema é que não estou recebendoo e-mail.
segue o código
$sql = "SELECT Nome, Email, Departamento, Status FROM assunto WHERE Departamento = '$Departamento' AND Status = 'A'";
if (!$sql){
$resp = "Ocorreu algum erro ao inserir o fotografo";
}
if($res = dbi_query($sql)) {
while($row=dbi_fetch_row($res)) {
$Email_cad = $row[1]."<br/>";
$EndServ = "[http://www.site.com.br/teste/";](http://www.site.com.br/teste/)
$headers .= 'MIME-Version: 1.0'. "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1'. "\r\n";
$headers .= 'From: <contato@email.com.br>'. "\r\n";
$headers = 'Cco: lf@email.com.br'."\r\n";
$Assunto = "E-mail do cliente $Nome";
mail($EMail_cad, $Assunto,"
<html>
<body>
<table width=\"550\">
<tr>
<th width=\"37%\" align=\"right\" scope=\"col\">Nome:</th>
<th width=\"63%\" align=\"left\" scope=\"col\">$Nome;</th>
</tr>
<tr>
<th align=\"right\" scope=\"row\">E-mail:</th>
<td align=\"left\">$Email</td>
</tr>
<tr>
<th align=\"right\" scope=\"row\">Telefone:</th>
<td align=\"left\">$Telefone</td>
</tr>
<tr>
<th align=\"right\" scope=\"row\">Cidade:</th>
<td align=\"left\">$Cidade</td>
</tr>
<tr>
<th align=\"right\" scope=\"row\">Estado:</th>
<td align=\"left\">$Esdado</td>
</tr>
<tr>
<th align=\"right\" scope=\"row\">Departamento:</th>
<td align=\"left\">$Departamento</td>
</tr>
<tr>
<th align=\"right\" scope=\"row\">Mensagem:</th>
<td align=\"left\">$Mensagem</td>
</tr>
<tr>
<th align=\"right\" scope=\"row\"> </th>
<td align=\"left\"> </td>
</tr>
<tr>
<th align=\"right\" scope=\"row\">IP:</th>
<td align=\"left\">$IP</td>
</tr>
<tr>
<th align=\"right\" scope=\"row\">Data:</th>
<td align=\"left\">$Data</td>
</tr>
<tr>
<th align=\"right\" scope=\"row\">Hora:</th>
<td align=\"left\">$Hora</td>
</tr>
</table>
</body>
</html>", $headers);
}
}
Já inseri um echo p; ver se ele recebe os e-mails do departamento e esta ok, só nao sei o pq o e-mail não chega na caixa postal.
Desde já agradeço a ajuda.
Abraço
Carregando comentários...