Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » PHP connection to Kerio Mailserver
  •  
psydl

Messages: 3
Karma: 0
Send a private message to this user
Hi,

I try to connect to Kerio Mailserver over PHP.
I want to read the INBOX with PHP. Like WebMail.

My System:

Kerio Mailserver
WinXP SP2
Firewall off

Client
Mac OS X 10.6
execute PHP connect

When I try to connect with the function
imap_open("{***.***.***.***:110/pop3}INBOX", "*****", "******");
the function get no Error and do nothing.
When I write an echo command behind the imap_open this will not be execute.

Must I open any Ports?
Must I configurate anything in Kerio Mailserver?

Thank You
  •  
marook

Messages: 520

Karma: 3
Send a private message to this user
Well, I would try to connect to the IMAP port and not the POP3 port... Wink

imap_open("{***.***.***.***:143}INBOX", "*****", "******");
<?php
$mbox = imap_open("{imap.example.org:143}", "username", "password");

echo "<h1>Mailboxes</h1>\n";
$folders = imap_listmailbox($mbox, "{imap.example.org:143}", "*");

if ($folders == false) {
    echo "Call failed<br />\n";
} else {
    foreach ($folders as $val) {
        echo $val . "<br />\n";
    }
}

echo "<h1>Headers in INBOX</h1>\n";
$headers = imap_headers($mbox);

if ($headers == false) {
    echo "Call failed<br />\n";
} else {
    foreach ($headers as $val) {
        echo $val . "<br />\n";
    }
}

imap_close($mbox);
?>


Regards,

Jakob Peterhänsel
Consultant - Humac A/S

Apple Certified Support Professional (ACSP)
Apple Certified Technical Coordinator (ACTC)
AppleSeed/CQF member since 1998
Kerio Messaging Partner
  •  
psydl

Messages: 3
Karma: 0
Send a private message to this user
HI
Thank you for your answer.
The problem is the same.
After I execute this line
$mbox = imap_open("{192.168.1.99:143}", "admin", "admin_22");
all behinde will not be execute.
e.g. echo "test";

I can ping the server.
I shut down the Firewall.


I think the problem is that I can not connect to imap on this server.

How can I test if the imap port is open.
  •  
Petr Dobry (Kerio)

Messages: 782
Karma: 61
Send a private message to this user
Make sure you have php-imap extensions installed. The problem you described look like you don't have it and PHP can't execute imap_open.

Petr Dobry
Product Development Manager | Kerio
  •  
pcunix

Messages: 594
Karma: 33
Send a private message to this user
It's relatively simple to test IMAP manually. See details at http://aplawrence.com/SCOFAQ/FAQ_scotec4testimap.html


Tony Lawrence
Kerio Preferred Partner and Reseller
Certified for Connect, Control
http://aplawrence.com
  •  
psydl

Messages: 3
Karma: 0
Send a private message to this user
Im so stupid.
The imap was not installed.

Thank you
Previous Topic: Exception to SMTP size limit
Next Topic: CardDAV & iPhone
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Sat Sep 23 00:25:08 CEST 2017

Total time taken to generate the page: 0.00448 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.