PHP Classes

Exchange 2000

Recommend this page to a friend!

      SMTP E-mail sending class  >  All threads  >  Exchange 2000  >  (Un) Subscribe thread alerts  
Subject:Exchange 2000
Summary:No es posible enviar correos a través de Exchange 2000
Messages:7
Author:Willia S
Date:2005-07-07 20:43:50
Update:2005-07-08 18:41:05
 

  1. Exchange 2000   Reply   Report abuse  
Picture of Willia S Willia S - 2005-07-07 20:43:50
El mensaje que aparece es:

Error: it was not possible to read line from the SMTP server: the server disconnected

Estoy probando con un usuario administrador.

Al intentar con otro usuario que se autentica en otro servidor, se logra la autenticación pero luego arroja el mensaje:

Error: could not connect to the host "mi.servidor.com": An established connection was aborted by the software in your host machine

¿alguna recomendación?

wilsan.

  2. Re: Exchange 2000   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2005-07-07 21:25:41 - In reply to message 1 from Willia S
Are you including the SASL class?

phpclasses.org/sasl

It is very likely that the server is requiring Windows NTLM authentication and it may disconnect if the client does not support it.

The SASL class is responsible for supporting authentication mechanisms. It supports Windows NTLM authentication mechanism. You just need to include the SASL class in your script like it is described in the example.

Alternatively, if your Exchange server is in the same server that runs PHP, you may want to try the MIME message class that comes with a sub-class specialized in dropping messages in the Pickup folder of Exchange. It does not require any SMTP connection and so it does not need to authenticate and is even faster.

phpclasses.org/mimemessage

  3. Re: Exchange 2000   Reply   Report abuse  
Picture of Willia S Willia S - 2005-07-07 22:09:53 - In reply to message 2 from Manuel Lemos
Gracias por la respuesta!, pero no creo que ese sea el problema ya que se probó con el servidor aceptando autenticación "Basic" y "Anonymous". :(

wilsan

  4. Re: Exchange 2000   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2005-07-07 22:28:05 - In reply to message 3 from Willia S
It is hard to tell without seeing what exactly happens. Can you please enable the debug flag and send me the output of the SMTP dialog when it fails?


Obviously you can replace and omit the user name and password from the output.

Ps. if you can reply in English that would be better so I do not misunderstand your Spanish as I am not a native Spanish speaker.

  5. Re: Exchange 2000   Reply   Report abuse  
Picture of Willia S Willia S - 2005-07-08 14:24:08 - In reply to message 4 from Manuel Lemos
Hi,

In this case the authentication is sucessfuly on server1, but to send message is no possible throw server2. ( there are some debugs by me )

Resolving POP3 authentication host "server1"...
Connecting to host address "192.168.1.10"...

fsockopen ok: Resource id #1 | |LLamado 1 ConnectToHost: S +OK Microsoft

Exchange 2000 POP3 server version 6.0.6603.0 (exchange.mydomain.com) ready.
C USER username
S +OK
C PASS password
S +OK User successfully logged on.
Resolving SMTP server domain "exchange.mydomain.com"... (server2)
Connecting to host address "192.168.1.11"...

Warning: fsockopen(): unable to connect to 172.17.1.10:25 in E:\VIANetSiteManager\VSMFilesDesa\lib\smtp.lib on line 231

fsockopen: | |call 2 ConnectToHost: could not connect to the

host "exchange.mydomain.com": ??


Another case: the authentication and sending by the same server

Resolving POP3 authentication host "server1"...
Connecting to host address "192.168.1.10"...
Cound not send the message to mymail@maydomain.com. Error: it was not possible to read line from the SMTP server: the server disconnected


Thanks a lot for your help.

Ps, On server where runs apareche+php(port 80) also runs apache tomcat(port 8080) and with jps sending throw server1 work good using javamail (the same exchange server with the same user and password )

  6. Re: Exchange 2000   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2005-07-08 17:59:02 - In reply to message 5 from Willia S
You are telling the class to authenticate via POP3 which does not seem to be what you want. In that case do not set the pop3_auth_host variable.

You just need to set the host_name variable with the correct address of SMTP server. You seem to have set to exchange.mydomain.com 192.168.1.11 which seems to be aliased to 172.17.1.10 but does not seem to accept SMTP connections. Probably this is not the correct address of the SMTP server either.

  7. Re: Exchange 2000   Reply   Report abuse  
Picture of Giuliano Stolf Giuliano Stolf - 2005-07-08 18:41:05 - In reply to message 1 from Willia S
Did you tried to put the string "From:" in the function mail()?
Like this:

mail("$to", "$subject", "$message", "From: $from)

Don´t forget to define your smtp server in the php.ini