Envio de correo con exchange y autenticacion ntlm
Publicado por Alvaro (2 intervenciones) el 04/12/2012 14:42:07
Hola a todos,
Necesito enviar correos en php mediante un servidor exchange con autenticcion ntlm, he intentado enviarlo con phpmailer que segun tengo entendido desde la version 5.2 soporta autenticacion NTLM, tengo el siguiente codigo:
<?php
$mail = new PHPMailer(true);
$mail->IsSMTP();
try {
$mail->Host = "mail.dominio.com";
$mail->SMTPDebug = 2;
$mail->SMTPAuth = true;
$mail->SMTPSecure = "tls";
$mail->Host = "mail.dominio.com";
$mail->Port = 587;
$mail->Username = "[email protected]";
$mail->Password = "*****";
$mail->SetFrom('[email protected]', 'Nombre');
$mail->AddAddress("[email protected]","Nombre de persona");
$mail->Subject = 'Asunto del correo';
$mail->AltBody = 'Caso que no soporte HTLM';
$mail->MsgHTML('Texto HTML');
$mail->AddAttachment("images/imagen.jpg", "imagen.jpg");
$mail->Send();
echo "Message Sent OK</p>\n";
} catch (phpmailerException $e) {
echo $e->errorMessage();
} catch (Exception $e) {
echo $e->getMessage();
}
?>
Per me lanza el siguiente mensaje de error:
SMTP -> FRO SERVER:220 mail.domicio.com Microsoft ESMTP MAIL Seervice ready at Mon, 3 Dec 2012 12:36:00 -040
SMTP -> FROM SERVER: 250-mail.dominio.co HELLO[10.0.0.15] 250-SIZE 10485760 250 -PIPELINING 250-ENHANCEDSTATUSCODES 250-AUTH GSSAPI NTLM 250 250-8BITMIME 250-BINARYMIME 250 CHUNKING
SMTP -> FROM SERVER:500 5.3.3. Unrecognized command
SMTP -> ERROR STARTTLS not accepted from server: 500 5.3.3. Unrecognized command
SMTP -> FROM SERVER:250 2.0.0 Resetting
Languaje string failed to load: tls
Alguien podria darme alguna idea por favor?
Necesito enviar correos en php mediante un servidor exchange con autenticcion ntlm, he intentado enviarlo con phpmailer que segun tengo entendido desde la version 5.2 soporta autenticacion NTLM, tengo el siguiente codigo:
<?php
$mail = new PHPMailer(true);
$mail->IsSMTP();
try {
$mail->Host = "mail.dominio.com";
$mail->SMTPDebug = 2;
$mail->SMTPAuth = true;
$mail->SMTPSecure = "tls";
$mail->Host = "mail.dominio.com";
$mail->Port = 587;
$mail->Username = "[email protected]";
$mail->Password = "*****";
$mail->SetFrom('[email protected]', 'Nombre');
$mail->AddAddress("[email protected]","Nombre de persona");
$mail->Subject = 'Asunto del correo';
$mail->AltBody = 'Caso que no soporte HTLM';
$mail->MsgHTML('Texto HTML');
$mail->AddAttachment("images/imagen.jpg", "imagen.jpg");
$mail->Send();
echo "Message Sent OK</p>\n";
} catch (phpmailerException $e) {
echo $e->errorMessage();
} catch (Exception $e) {
echo $e->getMessage();
}
?>
Per me lanza el siguiente mensaje de error:
SMTP -> FRO SERVER:220 mail.domicio.com Microsoft ESMTP MAIL Seervice ready at Mon, 3 Dec 2012 12:36:00 -040
SMTP -> FROM SERVER: 250-mail.dominio.co HELLO[10.0.0.15] 250-SIZE 10485760 250 -PIPELINING 250-ENHANCEDSTATUSCODES 250-AUTH GSSAPI NTLM 250 250-8BITMIME 250-BINARYMIME 250 CHUNKING
SMTP -> FROM SERVER:500 5.3.3. Unrecognized command
SMTP -> ERROR STARTTLS not accepted from server: 500 5.3.3. Unrecognized command
SMTP -> FROM SERVER:250 2.0.0 Resetting
Languaje string failed to load: tls
Alguien podria darme alguna idea por favor?
Valora esta pregunta


0