PHP - Problemas Enviar Correo

 
Vista:
Imágen de perfil de jose flores

Problemas Enviar Correo

Publicado por jose flores (6 intervenciones) el 25/05/2017 22:08:52
Hola buenas, hago mi practica profecional en una institucion y en esta estoy haciendo un sistema, en el cual necesito enviar un correo desde ese el servidor local de aca esto es mi codigo, (con gmail funciona perfecto)


-publico el codigo y el error, si sabe que puede ser

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require 'PHPMailerAutoload.php';
 
$mail = new PHPMailer;
 
$mail->isSMTP();
 
 
$mail->SMTPDebug = 2;
 
$mail->Debugoutput = 'html';
 
$mail->Host = 'xx.xx.xx.cl';
 
$mail->Port = 25;
 
$mail->SMTPSecure = 'tls';
 
$mail->SMTPAuth = true;
 
$mail->Username = "xx@xx.xx.cl ";
 
$mail->Password = "xxxx.2017";
 
$mail->setFrom('francisco.cid@xx.xx.cl', 'Sistema');
 
 $mail->addAddress("xx.xx@gmail.com", "jose flores");
$mail->Subject = "{$asunto}";
 
$mail->Body = "{asaas}";
 
$mail->AltBody = 'This is a plain-text message body';
 
if (!$mail->send()) {
    echo "Mailer Error: ";
                    echo $mail->ErrorInfo;
 
}

Y el error que me da es



SERVER -> CLIENT: 220 EXCHANGE01.xx.cl Microsoft ESMTP MAIL Service ready at Thu, 25 May 2017 16:13:03 -0400
CLIENT -> SERVER: EHLO localhost
SERVER -> CLIENT: 250-EXCHANGE01.xx.cl Hello [10.4.1.69]250-SIZE 36700160250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-STARTTLS250-8BITMIME250-BINARYMIME250 CHUNKING
CLIENT -> SERVER: STARTTLS
SERVER -> CLIENT: 220 2.0.0 SMTP server ready
SMTP Error: Could not connect to SMTP host.
CLIENT -> SERVER: QUIT
SERVER -> CLIENT:
SMTP ERROR: QUIT command failed:
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder