At 2010-11-12 16:05:10,"Dan Fandrich" <[email protected]> wrote: >On Fri, Nov 12, 2010 at 09:23:29AM +0800, IJÁÖº£ wrote: >> Hello >> When I use smtp to send mail, there will be following the situation, before >> the >> use of no such situation, I think that not sending HELO to continue to the >> other¡£ >> This is the code I write, is there a mistake? >> >> curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); >> curl_easy_setopt(curl, CURLOPT_HEADER, 1L); >> curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL); >> curl_easy_setopt(curl, CURLOPT_URL, "smtp.gmail.com"); > >The mistake is in this line: the value you set is not a URL. Therefore, >curl guesses what protocol you're asking for and in this case it guesses >wrong. Use an SMTP URL here, like smtp://smtp.gmail.com > >>>> Dan >------------------------------------------------------------------- >List admin: http://cool.haxx.se/list/listinfo/curl-library >Etiquette: http://curl.haxx.se/mail/etiquette.html Thanks! but when i use "smtp://smtp.gmail.com" , it shows like this: * Protocol smtp not supported or disabled in libcurl * Unsupported protocol n...@nms-desktop:~/work/test/curl$ curl --version curl 7.21.1 (i686-pc-linux-gnu) libcurl/7.21.1 zlib/1.2.3.3 libidn/1.15 Protocols: dict file ftp http imap ldap pop3 rtsp smtp telnet tftp Features: IDN IPv6 Largefile libz Is there any mistake? Thanks.
------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
