cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: SMTP functionality with authentication fails!

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 1 Dec 2012 13:51:34 +0100 (CET)

On Sat, 1 Dec 2012, Chandran, Naveen wrote:

> Please note: with the CURLOPT_HTTPPROXYTUNNEL option still in place, I am
> able to succeed with the curl_easy_perform anyway (and even send a mail),
> for the case where I do not use the gmail or other external mail servers.
>
> However, when I connect to an external mail server (such as gmail), I get
> the following logs:
>
> * About to connect() to smtp.gmail.com port 465 (#0)

This looks wrong as libcurl here tries to connect to the remote host and it
seems you want to use a proxy. You're supposed to have entered a proxy as
well, as CURLOPT_HTTPPROXYTUNNEL only changes how it uses the specified (HTTP)
proxy. You need to provide the proxy name and port separately.

> * Trying 173.194.68.108... * Connection refused

... clearly you can't connect directly to these hosts on port 465. Nothing
libcurl can do much about!

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-12-01