Jump to content
Fórum Script Brasil
  • 0

SMTP - PHP


Question

Olá ! Boa tarde a todos!

Tenho um código em PHP de envio de dados de um form de contato do meu site. Mas esta dando o seguinte erro:

SMTP -> ERROR: RSET failed:

Usuário e senha estão OK!

Segue o código para vossa análise e ajuda. Desde já agradeço.

<?php

$nome = $_POST['nome'];
$email = $_POST['email'];
$assunto = $_POST['assunto'];
$mensagem = $_POST['mensagem'];

require_once('class.phpmailer.php');
 
$mailer = new PHPMailer();
$mailer->IsSMTP();
$mailer->SMTPDebug = 1;
$mailer->Port = 587; 
$mailer->Host = 'smtp.emello.net.br'; 

$mailer->SMTPSecure = 'tls';
$mailer->SMTPAuth = true; 
$mailer->Username = '[email protected]'; 
$mailer->Password = '@239557Fefe'; 
$mailer->FromName = 'Contato do Site'; 
$mailer->From = '[email protected]'; 
$mailer->AddAddress('[email protected]'); 
$mailer->Subject = 'Contato do Site'.date("H:i").'-'.date("d/m/Y");
$mailer->Body = 'Sua mensagem';
if(!$mailer->Send())
{
echo "Mensagem não enviada";
echo "Erro: " . $mailer->ErrorInfo; exit; }
print "E-mail enviado!";
 
?>

 

 

Link to post
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      148681
    • Total Posts
      644506
×
×
  • Create New...