In my host class smtp.php doesn't work trough proxySOCKS5, why?

Recommend this page to a friend!

      SMTP E-mail sending class  >  All threads  >  In my host class smtp.php doesn't...  >  (Un) Subscribe thread alerts  
Subject:In my host class smtp.php doesn't...
Summary:ssl or tls anyway doesn't work...
Messages:6
Author:Amir
Date:2016-08-23 16:47:07
 

  1. In my host class smtp.php doesn't...   Reply   Report abuse  
Picture of Amir Amir - 2016-08-23 16:47:07
Good evening, Manuel Lemos!

Before with tls it shows:
Resolving SMTP server domain "smtp.mail.ru"...
Connecting to SOCKS server "$proxyIP" '$proxyPort' ... // Here $proxyIP and $proxyPort means my proxyserver and port
Connected to the SOCKS server "$proxyIP" // Here $proxyIP means my proxyserver
Negotiating the authentication method ...
Connecting to SMTP server IP 94.100.180.160 port 465...
Could not send the message to air-aktau@mail.ru. Error: SOCKS error: Connection refused

Now I did as you recommended and it shows:
Resolving SMTP server domain "smtp.mail.ru"...
Connecting to SOCKS server "31.184.233.124" port 30006...
Could not send the message to air-aktau@mail.ru. Error: could not connect to the host "smtp.mail.ru":

Now what I have to do?

PS: in file smtp.php on line 786 "$this->OutputDebug("Connecting to SOCKS server \"".$socks_host."\" port ".$this->http_proxy_host_port."...");" I changed "http_proxy_host_port" to "socks_host_port", because if I don't do that it shows - Connecting to SOCKS server "$proxyIP" 'http_proxy_host_port' ...
Did I do right or not?

  2. Re: In my host class smtp.php doesn't...   Reply   Report abuse  
Picture of Amir Amir - 2016-08-23 17:12:27 - In reply to message 1 from Amir
Alsow I tried tls and ssl with my Gmail.com and Yandex.ru accounts but result is the same:

1. with tls:
Resolving SMTP server domain "smtp.gmail.com"...
Connecting to SOCKS server "$proxyIP" port '$proxyPort' ...
Connected to the SOCKS server "$proxyIP"
Negotiating the authentication method ...
Connecting to SMTP server IP 173.194.222.109 port 587...
Could not send the message to air-aktau@mail.ru. Error: SOCKS error: Connection refused

2. with ssl:
Resolving SMTP server domain "smtp.gmail.com"...
Connecting to SOCKS server "$proxyIP" port '$proxyPort' ...
Could not send the message to air-aktau@mail.ru. Error: could not connect to the host "smtp.gmail.com":

  3. Re: In my host class smtp.php doesn't...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-08-23 20:21:21 - In reply to message 1 from Amir
If you are using port 587, usually is to start TLS. Set start_tls to 1 and ssl to 0.

  4. Re: In my host class smtp.php doesn't...   Reply   Report abuse  
Picture of Amir Amir - 2016-08-23 21:34:50 - In reply to message 3 from Manuel Lemos
For smtp.mail.ru I use port 465.
smtp.mail.ru server use ssl-session: protocol: TLSv1/SSLv3 (this info I got using connection with OPENSSL.exe)
So when I try to send email using smtp.mail.ru with tls=1 it's showing me this:
Resolving SMTP server domain "smtp.mail.ru"...
Connecting to SOCKS server "proxyIP" port "proxyPORT"...
Connected to the SOCKS server "proxyIP"
Negotiating the authentication method ...
Connecting to SMTP server IP 94.100.180.160 port 465...
Could not send the message to air-aktau@mail.ru. Error: SOCKS error: Connection refused

So question the same what is wrong and why it can't send email?
PS: my version PHP 5.3.3 (native).

  5. Re: In my host class smtp.php doesn't...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-08-30 20:37:44 - In reply to message 4 from Amir
I need to make time to install a socks server here to see how it should work with SSL connections because the encryption should be between the two ends but I am not sure. Please be patient until I can check this out.

  6. Re: In my host class smtp.php doesn't...   Reply   Report abuse  
Picture of Amir Amir - 2016-09-01 22:45:02 - In reply to message 5 from Manuel Lemos
Ok Manuel Lemos, thanks, I'll be waiting for you!!!
I hope it doesn't take you much time )

 
For more information send a message to info at phpclasses dot org.