0

good afternoon!

I am having a problem with "imap_open" it is not able to open connection to an external server because I am behind a proxy server.

I tried several settings with the "stream_context_set_default", "" stream_context_set_option "and" stream_context_set_params ". I do not know if these are the most suitable functions for my case, but in my Google searches it was what they usually indicated and that's why I dedicated myself to them because I did not find other alternatives, so I do not know if I was investing in the wrong functions or if I was just too lazy to try to configure them.

From what I was able to find out the proxy here of my company uses NTLM authentication. From what I understand this kind of authentication is much more complex than sending a valid user name and passwords to the proxy server. Leaving my situation even more complex ...

Has anyone ever had anything like this and can you help me? Maybe give me an alternative I have not tried ....

Tks!

  • If I may suggest to have a look at [cntlm](http://cntlm.sourceforge.net/), you would use it as a proxy to authenticate on the "real" proxy. This would look like : imap_open --> cntlm --> proxy --> mailserver , and then you don't need to change anything in your PHP code. – Eugène Adell Jan 22 '19 at 21:44
  • 527/5000 Thanks for your response, I think it has brought me closer to the resolution but I have not yet been able to achieve my goal. Now I have a simpler authentication proxy but I still can not use imap_open. I figured that I could have a configuration of the php itself (like in php.ini) to set up a proxy server, but I could not find it. I searched Google but found nothing that would help me, quote the stream_context_ * functions a lot, but they still are not helping me. Once again, thank you for your attention! – Gabriel Bueno Lemes da Silva Feb 04 '19 at 13:25

0 Answers0