nashbur Posted March 6, 2009 Share Posted March 6, 2009 Hi, I sit inside a lan whose outgoing traffic is routed through a proxy server. and it requires authentication. E.g. to open www.gmail.com using firefox, i have to select 'manual proxy configuration' option. i give server n port number there. n provide username n password (for proxy). Now here is my problem. $connection = imap_open('{imap.gmail.com:993/ssl}', '[email protected]', 'gmail-password') or die("can't connect: " . imap_last_error()); Usually this should connect to gmail inbox. but since I am behind a proxy, the proxy also needs to be authenticated. I am stuck about how to do that. To explain more, i will give one more example. While using 'wget' , I have to set http_proxy = http://proxy-server:80/ proxy-user = proxy-user proxy-passwd = proxy-pass So, I think, for imap_open also, i will have to do similar thing. but im not sure how to do that. can anyone help? thanks Link to comment https://forums.phpfreaks.com/topic/148202-using-imap_open-behind-proxy/ Share on other sites More sharing options...
DjMikeS Posted March 6, 2009 Share Posted March 6, 2009 Read this: http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_11909502.html (Scroll down) Link to comment https://forums.phpfreaks.com/topic/148202-using-imap_open-behind-proxy/#findComment-778037 Share on other sites More sharing options...
nashbur Posted March 6, 2009 Author Share Posted March 6, 2009 Thanks for the link. but being a student, I cant afford to invest money in signing up there. anyways, my problem is really different from that. I don't want to download the page. I just want to make connection through imap_open and then retrieve mails (through some processing on connection variable.). So proxy authentication while using imap_open is required. please suggest something. Link to comment https://forums.phpfreaks.com/topic/148202-using-imap_open-behind-proxy/#findComment-778302 Share on other sites More sharing options...
nashbur Posted March 7, 2009 Author Share Posted March 7, 2009 To help you more understand the problem, here is the error I am getting. Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/imap/ssl/tls}INBOX in /home/www/mysite/php/connection.php on line 7 Array ( [0] => Can't open mailbox {imap.gmail.com:993/imap/ssl/tls}INBOX: invalid remote specification ) guys, please help Link to comment https://forums.phpfreaks.com/topic/148202-using-imap_open-behind-proxy/#findComment-778883 Share on other sites More sharing options...
DjMikeS Posted March 9, 2009 Share Posted March 9, 2009 Dude, that's why I said....scroll all the way down....experts-exchange let's you read the answers if you just scroll all the way down.... Link to comment https://forums.phpfreaks.com/topic/148202-using-imap_open-behind-proxy/#findComment-780596 Share on other sites More sharing options...
nashbur Posted March 10, 2009 Author Share Posted March 10, 2009 As I said, I am not registered on the forum, you have given the link to. And it demands money for the registration. I cant afford it being student. can you just paste it here? neways, telnet imap.gmail.com 993 is not connecting to the imap. Is this the sufficient indication that my proxy server is not allowing the connection? N I should ask the sysads to allow that to happen? Link to comment https://forums.phpfreaks.com/topic/148202-using-imap_open-behind-proxy/#findComment-780904 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.