Login   Register  
PHP Classes
elePHPant
Icontem

how to specify proxy credentials from smtp class

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      SMTP E-mail sending class  >  All threads  >  how to specify proxy credentials from smtp class  >  (Un) Subscribe thread alerts  
Subject:how to specify proxy credentials from smtp class
Summary:how to specify proxy credentials from smtp class
Messages:7
Author:buruguduy
Date:2012-08-11 15:33:48
Update:2013-05-14 04:46:37
 

  1. how to specify proxy credentials from smtp class   Reply   Report abuse  
Picture of buruguduy
buruguduy
2012-08-11 15:33:48
Hi, good day!

Upon stumbling from your smtp class, Id like to know how can i pass our proxy credentials, since its always returning the message: "HTTP/1.1 407 proxy authentication required"

Thanks a lot for your time.

  2. Re: how to specify proxy credentials from smtp class   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2012-08-12 07:58:25 - In reply to message 1 from buruguduy
I never had access to a HTTP proxy that requires authentication but it can be added support for that. Is that public proxy or otherwise can you provide an access so we can test it?

  3. Re: how to specify proxy credentials from smtp class   Reply   Report abuse  
Picture of buruguduy
buruguduy
2012-08-12 08:10:40 - In reply to message 2 from Manuel Lemos
No sir, the setup would be tested using pur network but the smtp used is gmail, but since we have proxy over the server, it requires credential for that.
How can we add that functionality, i go over the smtp_class but I think its not specified there, am I correct?

Thanks a lot.

  4. Re: how to specify proxy credentials from smtp class   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2012-08-22 03:41:40 - In reply to message 3 from buruguduy
That can be done using code from the HTTP client class that already does proxy authentication and routing. I just need more time to setup a proxy server here to test it. Just let me know if you can wait.

  5. Re: how to specify proxy credentials from smtp class   Reply   Report abuse  
Picture of buruguduy
buruguduy
2012-08-22 06:41:13 - In reply to message 4 from Manuel Lemos
Thanks manuel, Im sorry that I couldnt wait for your reply and find out some other things that might possibly worked. I got it working by adding few lines, I just modify the smtp_class and added properties for proxy login and password, then i added this line under the ConnecttoHost method just below the User-agent header.
&& $this->PutLine('Proxy-Authorization: Basic '.base64_encode("$this->proxylogin:$this->proxypasswd"))
Im not sure if its the best thing to do this, but its working.
Thanks a lot.

  6. Re: how to specify proxy credentials from smtp class   Reply   Report abuse  
Picture of Roy Martins
Roy Martins
2013-05-13 19:41:19 - In reply to message 5 from buruguduy
Hi. Thanks for this class. It's great but I'm having issues with basic proxy connections without authentication. Is this correct?

$smtp->http_proxy_host_name='199.231.93.180'; /* Change this variable if you need to connect to SMTP server via an HTTP proxy */
$smtp->http_proxy_host_port='3128'; /* Change this variable if you need to connect to SMTP server via an HTTP proxy */

Is there something wrong with my proxy or your script?

  7. Re: how to specify proxy credentials from smtp class   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2013-05-14 04:46:37 - In reply to message 6 from Roy Martins
It seems that proxy is for HTTP requests, not for SMTP.

Has anybody told you that proxy would work for SMTP?