Re: PHP & MS Exchange Server problem
| From: | Baroiller Pierre-Emmanuel | Date: | Wed, 16 Jul 2003 21:57:42 +0000 |
| Subject: | Re: PHP & MS Exchange Server problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-155497@lists.php.net to get a copy of this message | ||
Hi...
are your sure your Exchanger server has imap enabled and port 143 is open ?
If you've got the message "connection refused", it can be :
- not imap server is running
- your login/password couple is wrong
or
- you can't connect to the port 143...
regards,
P.E. Baroiller
"Charles Vos" <CVos@survdata.com> a écrit dans le message de
news:14E783AB1B496142B8472C283202581A1DEEC9@sdi_email_dr.SDI...
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