Harshdeep Singh wrote: > I am trying to send a mail using SMTP with libcurl. I manage to do it using command line option i use the command:
> curl --ssl --mail-from "<[email protected]>" --mail-rcpt "<[email protected]>" -v --url smtp://smtp.gmail.com -u harshcalsoft -T text . . . > curl_easy_setopt(curl,CURLOPT_URL,"smtps://smtp.gmail.com"); > curl_easy_setopt (curl, CURLOPT_USERPWD, "username:password"); The only reason I can imagine for now is: 1) You use a curl/libcurl version in which the smtp authentication was not yet implemented, and 2) Smtp is not smtps: seems that the two ports answer properly on the same server, but unlike the smtp port, the smtps port requires an authentication. If I'm right, the verbose output of the command line tool (not present in your mail) should also show an unauthenticated client/server dialog. ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
