IMAP Function Not work

Problems with the Linux version of XAMPP, questions, comments, and anything related.

IMAP Function Not work

Postby gnabhan » 11. July 2007 13:05

Hi,

I configured sendmail, dovecot and lampp in my linux system.

From php, when i call the following function, i have error. what i did wrong.
how do i solve.

$mailbox = imap_open("{192.168.1.100/imap}inbox","**","**");

Error Message is:

Warning: imap_open() [function.imap-open]: Couldn't open stream {192.168.1.100/imap}inbox in /opt/lampp/htdocs/imap_test/Test.php on line 9
Array ( [0] => rsh to IMAP server timed out [1] => Certificate failure for 192.168.1.100: self signed certificate: /OU=IMAP server/CN=imap.example.com/emailAddress=postmaster@example.com )
Warning: imap_check(): supplied argument is not a valid imap resource in /opt/lampp/htdocs/imap_test/Test.php on line 14
gnabhan
 
Posts: 7
Joined: 11. July 2007 13:00

Re: IMAP Function Not work

Postby ManUnix » 11. July 2007 16:12

Hi gnabhan,

imap_open Parameters

maybe
Code: Select all
$mailbox = imap_open("{192.168.1.100/imap/notls}inbox","**","**");
or:
$mailbox = imap_open("{192.168.1.100/imap/novalidate-cert}inbox","**","**");
?
User avatar
ManUnix
 
Posts: 113
Joined: 16. April 2006 15:14

IMAP Authentication Problem in PHP

Postby gnabhan » 12. July 2007 05:02

Dear Friend,

Thankyou for your reply.

I worked the below code. I don't know what is the username and password. i put it as
(Outlook Express: incoming mail server account name and password).
Am i right?
<?

$mailbox = imap_open("{192.168.1.100/imap/notls}inbox","user","user");
print_r(imap_errors());

// Check messages
$check = imap_check($mailbox);
print("<PRE>");
print("Date most recent message : " . $check->Date);
print("<BR>");
print("Connection type : " . $check->Driver);
print("<BR>");
print("Name of the mailbox : " . $check->Mailbox);
print("<BR>");
print("Number of messages : " . $check->Nmsgs);
print("<BR>");
print("Number of recent messages : " . $check->Recent);
print("<BR>");
print("</PRE>");

?>

Runing this code, page has displayed as below:

Array ( [0] => rsh to IMAP server timed out [1] => SECURITY PROBLEM: insecure server advertised AUTH=PLAIN )

Date most recent message : Thu, 12 Jul 2007 09:20:07 +0530 (IST)
Connection type : imap
Name of the mailbox : {192.168.1.100:143/imap/notls/user="user"}inbox
Number of messages : 0
Number of recent messages : 0


I am new in Linux environment. So please help me, what i to do next. Is there any configuration in php.ini for IMAP.

I did't touch any modification in php.ini still.

With Thanaks & Regards,
G. Padmanabhan
gnabhan
 
Posts: 7
Joined: 11. July 2007 13:00

Re: IMAP Authentication Problem in PHP

Postby ManUnix » 12. July 2007 14:56

Hi gnabhan,

gnabhan wrote:(Outlook Express: incoming mail server account name and password).
Am i right?

yes, should be correct.

gnabhan wrote:Array ( [0] => rsh to IMAP server timed out [1] => SECURITY PROBLEM: insecure server advertised AUTH=PLAIN )

maybe it works if you change your dovecot-configuration like this:
Code: Select all
disable_plaintext_auth = no
User avatar
ManUnix
 
Posts: 113
Joined: 16. April 2006 15:14


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 9 guests