View Single Post

  #1 (permalink)  
Old 07-16-2003
Charles Vos
 
Posts: n/a
Default PHP & MS Exchange Server problem

Hello All---

I'm having some trouble getting PHP to communicate with my Windows 2000 MS Exchange Server... I'm running PHP 4.3.2 on a Win2000 machine serving with Apache 1.3.

The code I'm using is:

$mbox = imap_open("{x.x.x.x:143}","admin","adminpass", OP_HALFOPEN);
$err = imap_errors();
while (list($key, $val) = each($err))
print imap_utf7_decode($val)."<br>\n";
$alrt = imap_alerts();
while (list($key, $val) = each($alrt))
print imap_utf7_decode($val)."<br>\n";

This yields the error:
Warning: imap_open(): Couldn't open stream {x.x.x.x:143} in c:\apache\apache\htdocs\sdimail.php on line 11
Connection refused

If I change the imap_open command to use {x.x.x.x:143\yyyy} as the host, I get a different error:

Warning: imap_open(): Couldn't open stream {x.x.x.x:143\yyyy} in c:\apache\apache\htdocs\sdimail.php on line 11
Can't open mailbox {192.168.0.3:143\yyyy}: invalid remote specification

which makes me suspect that I am actually able to connect but PHP isn't finding anything it likes (what is it looking for?)

can anyone help me with this or at least point me towards a tutorial on using PHP with MS Exchange?

Thanks in advance for your help,

-Charlie
cvos@survdata.com

Reply With Quote