Conexão com gmail e outros
Enviado: 27 Mai 2024 13:22
Passei por isto hoje, e achei interessante:
Você passa a usar uma conexão local, e o stunnel faz o serviço.
Só não vi se tem isso pra Windows.
Se o programa não tem os recursos pra conectar diretamente, instala-se o stunnel como intermediário.The issue is that you are trying to connect to Google through an encrypted session port. How I have been able to get this done is to use stunnel to provide that encrypted session support. I was going to post a link to message threads that discuss this very topic, but I am not finding them just yet. Essentially, you would need to tell Gmail to allow less secure applications to access your account (there is a setting for this), and then install the free tool called stunnel. With this done, you point to use your local connection instead of using smtp.gmail.com. The local connection would be 127.0.0.1, on a port number of your choosing. This port number must be in your stunnel.conf file to allow stunnel to listen on that port for your connection request.
My stunnel.conf has the following related to Gmail:
CAfile = cert.pem
cert = client.pem
client = yes
RNDfile = .rnd
fips = no
output = stunnel.log
sslVersion = TLSv2
[gmail smtp]
accept = 27
connect = smtp.gmail.com:587
protocol = smtp
With the above stunnel configuration, I would connect to 127.0.0.1:27, where the semicolon (:) separates the IP address from the port number. Stunnel is configured to listen to port 27, and when a connection request is received on that port, it will establish an encrypted session with Gmail, allowing to be none-the-wiser while sending your emails.
Você passa a usar uma conexão local, e o stunnel faz o serviço.
Só não vi se tem isso pra Windows.