Jump to content

binit

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

binit's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I'm trying to edit a post of mine but I cant see any edit option in my post. Can someone help me with this? I'm also not able to send PMs may be because of my n00bie status. Any help/suggestion would be appreciated. I can only see the quote option there but no modify option. Note that I made that post some 10 or so days ago...
  2. The problem was finally solved. I thought it would be a good idea if I put the solution here since the problem seems to be very common and I found lots of instances of this problem on the net but none of them could provide a working solution (at least for my case) However I did manage to find a solution which is as follows: 1. First of all I installed stunnel (Stunnel is a program that allows you to encrypt arbitrary TCP connections inside SSL) from http://www.stunnel.org/ 2. Then in the stunnel.conf file I made the following changes: [imapsClient] accept = localhost:143 connect = mail.ttu.edu:993 client = yes sslVersion = TLSv1 Note that you'll already find these lines in the conf file: [imaps] accept = 993 connect = 143 I preferred to comment out these lines and replaced them by the ones mentioned above. Also note that the settings which I changed in the stunnel.conf file are specific to my IMAP server (mail.ttu.edu:993) so you should make your changes accordingly. 3. What stunnel is essentially doing here is mapping the insecure IMAP connection (on port 143) at localhost to my imap server (mail.ttu.edu) on port 993. 4. After making these changes, run stunnel and try: telnet localhost 143 if everything is working fine then you should be getting and OK message. In my case I got this message: OK Microsoft Exchange Server 2003 IMAP4rev1 server version 6.5.7638.1 (enceladus.net.ttu.edu) ready. 5. After this I tried the imap_open() function like this: $imap = @imap_open("{localhost:143}INBOX", $user, $pass); and it worked fine.This created an imap resource named imap.Now you can use series of imap related functions using this resource (imap). Note that earlier I was trying to connect directly to the server using imap_open() function but now since stunnel is doing the mapping for me from localhost:143 to mail.ttu.edu:993 (IMAP over SSL) so I gave localhost:143 as the argument in imap_open() function. If you need any more information regarding this issue then you can send me a PM. I would be happy to help you as I have spent way too much time on this problem.
  3. When I'm trying to change the parameters I'm getting some other error as well for example if i change the server address to mail.ttu.edu/exchange (this is where the exchange server is running) then I get the following error in place of the earlier error: Array ( [0] => Can't open mailbox {mail.ttu.edu/exchange:993/imap}INBOX: invalid remote specification ) I'm trying to toggle between the various possible combinations as suggested by the imap_open() manual at php.net but I'm getting either of these 2 errors in all the cases
  4. There is one more thing: a line in the php.ini file says this: max_input_time = 60 ; Maximum amount of time each script may spend parsing request data Can this have something to do with the problem?
  5. Hi, I'm trying to write a PHP mail parsing code for accessing and retrieving messages from an inbox using a series of IMAP based functions.I'm getting an error in a basic PHP code which I've written using just the imap_open() function and not any other functions as of now.When I try to connect using the code I get the following error Array ( [0] => [CLOSED] IMAP connection broken (server response) ) This is the actual code which I'm using: <?php $server = "mail.ttu.edu"; $user = ""; $pass = ""; //fscokopen test echo "<br> --> imap php test...<br>"; $i = @fsockopen($server, 993, $errno, $errstr, 30); if ($i){ echo "<br> -->fsockopen test...<br>"; } else { echo $errno; echo $errstr; } $i = @imap_open("{mail.ttu.edu:993}INBOX", $user, $pass); if ($i){ echo "<br> --> connection successful....<br>"; } else { echo "<br> --> connection to server failed...<br>"; print_r(imap_errors()); } ?> The error message which I'm getting is displayed exactly after 60 seconds from running the code.I'm not sure if it is from the server side or from the settings in my php.ini file. Also note that fsockopen() is working fine and also telnet to port 993 of the server is working too. It is kind of urgent so any help will be greately appreciated. If you need any more inputs then please let me know.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.