Ir para conteúdo
Fórum Script Brasil

Edu Henriique

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Tudo que Edu Henriique postou

  1. Edu Henriique

    Me ajuda

    Galera é o seguinte,não se estou postando no local correto mas preciso muito da ajuda de vocês é o seguinte... Tenho esse Formulário : <form action="../Grav/GravFaleConosco.php" method="POST"> <fieldset> <legend><b>Fale Conosco</b></legend> <div> <br> <label for="email" name="email">E-mail</label> <input type="text" name="email" id="Email"/> </br> <label for="nome">Nome</label> <input type="text" name="nome" id="nome"/> </br> <p>Selecione o departemento que deseja falar</p> <label><input type="radio" value="Compras" />Compras</label> <label><input type="radio" value="Vendas" /> Vendas</label> <label><input type="radio" value="Financeiro"/>Financeiro</label> <label><input type="radio" value="RoyaleHome"/>Outros</label> <br> <br> <label for="nome">Assunto:</label> <input type="text" name="assunto" id="nome"/> <label for="mensagem"></label> <p>Escreva sua mensagem:</p> <textarea id="mensagem" rows="7" cols="58" name="mensagem" ></textarea> </br> </div> <input type="submit" value="Enviar" id=""/> <input type="submit" value="Limpar" id=""/> </form> php: <?php $email=$_POST['email']; $nome=$_POST['nome']; $Assunto=$_POST['assunto']; $mensagem=$_POST['mensagem']; $tabela="<table border=5 bordercolor=blue cellspacing=5 cellpadding=5> <caption> <tr><td>$email</td></tr> <tr><td>$nome</td></tr></tr> <tr><td>$mensagem</td></tr> </caption> </table>"; require_once '../../controller/class.phpmailer.php'; //instanciação do objeto phpmailer $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "smtp.live.com"; // SMTP server //SÓ PARA TESTE - REALIZA O DEBUG $mail->SMTPDebug = 2; // enables SMTP debug information (for testing) // 1 = errors and messages // 2 = messages only $mail->SMTPSecure = ('tls'); $mail->SMTPAuth = true; // enable SMTP authentication $mail->Host = "smtp.live.com"; // sets the SMTP server $mail->Port = 25; // set the SMTP port for the GMAIL server $mail->Username = "teste@hotmail.com"; // SMTP account username $mail->Password = ""; // SMTP account password $mail->SetFrom('dudu_strike@hotmail.com', 'TESTE ENVIO EMAIL'); $mail->Subject = $Assunto; $mail->MsgHTML($mensagem); if($Assunto== "Compras") { $address = "dudu_strike@hotmail.com"; $mail->AddAddress($address); }else { if ($Assunto == "Vendas") { $address="dudu_strike@hotmail.com"; }else { if($Assunto =="Financeiro") { $address="dudu_strike@hotmail.com"; }else if($Assunto == "Outros") { $address="dudu_strike@hotmail.com"; } } } $mail->AddAddress($address); if(!$mail->Send()) { echo "Erro ao Enviar: " . $mail->ErrorInfo; } else { header("location:"); } ?> aparece esse erro no Navegador : Invalid address: You must provide at least one recipient email address. Erro ao Enviar: You must provide at least one recipient email address alguém pode me ajudar? Obs: Tirei o passoword e o header porque segurança.
×
×
  • Criar Novo...