Stewart Posted May 23, 2006 Share Posted May 23, 2006 trying to configure phpbb's smtp.php to sent email via a proxy. this file uses the fsockopen command to connect directly to teh smtp server, however i need to connect via proxy instead. does anyone have any idea how i can do this? Link to comment Share on other sites More sharing options...
Stewart Posted May 24, 2006 Author Share Posted May 24, 2006 anybody? Link to comment Share on other sites More sharing options...
justsomeguy Posted May 24, 2006 Share Posted May 24, 2006 I haven't seen anything on how to connect through a proxy. I'm not saying it's not possible, but I haven't seen it done. You could try some clever use of Google, that's probably your best bet. Link to comment Share on other sites More sharing options...
Stewart Posted May 24, 2006 Author Share Posted May 24, 2006 have tried some clever use of grey matter instead and came up with a thought - if an smtp stream couldnt get through the proxy then why not send an http stream through and have a php script somewhere on teh other side to translate it into mail - i.e. if i send an html request through this proxy server with teh required data to a php script on an external server with access to mailing fucntions then it could send it insteadunfortuanately this presents a problem ofhaving to send post data behind the scenes.i have with success managed to use the fsockopen command to connect to theis external server via the proxy and send a GET request through to an external scriptbasically sending the following comand out: GET http://www.google.com/search?q=pizza HTTP/1.1 unfortunately because of the size of these emails it cant be sent using GET, needs to use post, but i cant get post to work this way - does anyone know how to write th browser headers for a form post? Link to comment Share on other sites More sharing options...
justsomeguy Posted May 25, 2006 Share Posted May 25, 2006 Well, it looks like post is not a header at all, but is a part of the body of the request.From http://developers.sun.com/techtopics/mobil...ttips/HTTPPost/ In constrast, a POST request sends additional data to the web server, specified after the URL, the headers, and a blank line to indicate the end of the headers. An example: POST /login.jsp HTTP/1.1Host: www.mysite.comUser-Agent: Mozilla/4.0Content-Length: 27Content-Type: application/x-www-form-urlencodeduserid=joe&password=guessme Make sure you set content-length correctly. Link to comment Share on other sites More sharing options...
Stewart Posted May 25, 2006 Author Share Posted May 25, 2006 yes - i meant request not header. the only thig is i have tried that site, and i can get get to work,m but not post Link to comment Share on other sites More sharing options...
justsomeguy Posted May 25, 2006 Share Posted May 25, 2006 And you are URL-encoding the form data, right?What do you mean it doesn't work, what happens? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now