Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
ESTOU RODANDO EM WINDOWS COM XAMPP LOCALHOST E NÃO IMPORTA O QUE EU FAÇA APARECE A SEGUINTE MENSAGEM:
SMTP Connect() failed.
Mailer Error: SMTP Connect() failed.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PHPMailer - GMail SMTP test</title>
</head>
<body>
<?php
//SMTP needs accurate times, and the PHP time zone MUST be set
//This should be done in your php.ini, but this is how to do it if you don't have access to that
date_default_timezone_set('Etc/UTC');
require '../class.phpmailer.php';
//Create a new PHPMailer instance
$mail = new PHPMailer();
//Tell PHPMailer to use SMTP
$mail->IsSMTP();
//Enable SMTP debugging
// 0 = off (for production use)
// 1 = client messages
// 2 = client and server messages
$mail->SMTPDebug = 2;
//Ask for HTML-friendly debug output
$mail->Debugoutput = 'html';
//Set the hostname of the mail server
$mail->Host = 'ssl://smtp.gmail.com';
//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission
$mail->Port = 587;
//Set the encryption system to use - ssl (deprecated) or tls
$mail->SMTPSecure = 'ssl';
//Whether to use SMTP authentication
$mail->SMTPAuth = true;
//Username to use for SMTP authentication - use full email address for gmail
$mail->Username = "thiago.web.m@gmail.com";
//Password to use for SMTP authentication
$mail->Password = "a senha esta certa";
//Set who the message is to be sent from
$mail->SetFrom('from@example.com', 'First Last');
//Set an alternative reply-to address
$mail->AddReplyTo('thiago.web@hotmail.com.br','First Last');
//Set who the message is to be sent to
$mail->AddAddress('thiago.web@hotmail.com.br', 'John Doe');
//Set the subject line
$mail->Subject = 'PHPMailer GMail SMTP test';
$mail->Body = 'PHPMailer GMail SMTP test';//Send the message, check for errors
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!";
}
?>
</body>
</html>procurei o dia todo no google
mais alguém?
cade os adm desse imasters, vi um deles esses dias, não dá pra dar uma força aqui?
brincadeira isso
até parece que Controle de Spammers é uma pessoa mesmo...mas se for me ajuda ai
??????????????????
esse forum ja foi melhor pqp
No próprio arquivo que vc baixou tem um exemplo usando gmail
<?php
include( 'class.phpmailer.php' );
include( 'class.smtp.php' );
$mail = new PHPMailer( );
$body = null;
$mail->IsSMTP( );
$mail->SMTPAuth = true;
$mail->SMTPSecure = 'ssl';
$mail->Host = 'smtp.gmail.com';
$mail->Port = 465;esse forum ja foi melhor pqp
Reclamar é facil agora procurar não né
http://luisdalmolin.com.br/enviando-e-mails-autenticados-com-phpmailer-gmail/
primeiro resultado
caso nao conheça existe um site chamado google -> www.google.com.br ele ajuda muita gente numa dessa pode te ajudar as vezes quando a preguiça deixar
>
No próprio arquivo que vc baixou tem um exemplo usando gmail
<?php
include( 'class.phpmailer.php' );
include( 'class.smtp.php' );
$mail = new PHPMailer( );
$body = null;
$mail->IsSMTP( );
$mail->SMTPAuth = true;
$mail->SMTPSecure = 'ssl';
$mail->Host = 'smtp.gmail.com';
$mail->Port = 465;
eu sei mas mesmo assim obrigado, o problema era uma regra no firewall
>
Reclamar é facil agora procurar não né
http://luisdalmolin.com.br/enviando-e-mails-autenticados-com-phpmailer-gmail/
primeiro resultado
caso nao conheça existe um site chamado google -> www.google.com.br ele ajuda muita gente numa dessa pode te ajudar as vezes quando a preguiça deixar
em primeiro lugar estou aqui a mais tempo que você, em segundo lugar o problema era o firewall, mesmo assim obrigado
resolvido
Reza não vai resolver nunca, mas quem sabe uma procurada no Google ;) .