I was doing a code for sending mails with the playbook and marmalade, this is my code
curl_easy_setopt(curl, CURLOPT_URL, "smtp://smtp.gmail.com:587");
//curl_easy_setopt(curl, CURLOPT_PORT, this->_PORT);
curl_easy_setopt(curl,CURLOPT_CONNECTTIMEOUT, 15);
curl_easy_setopt(curl,CURLOPT_TIMEOUT, 30);
curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
curl_easy_setopt(curl, CURLOPT_USERNAME, "xxxxxxx@gmail.com");
curl_easy_setopt(curl, CURLOPT_PASSWORD, "xxxxxxx");
curl_easy_setopt(curl, CURLOPT_MAIL_FROM, this->_FROM);
recipients = curl_slist_append(recipients, this->_TO);
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
res = curl_easy_perform(curl);
It is the example from libcurl. (http://curl.haxx.se/libcurl/c/smtp-tls.html)
But everytime the curl_easy_perform executes i got the error CURLE_COULDNT_RESOLVE_HOST with every single address it does'nt matter if it is http,smtp, ftp, etc.
And if I put the IP instead of the name i always get Permission Denied.
I thing the error is the fake-ares.cpp and its asynchronous resolve.
I am using libcurl 7.21.7 and Marmalade 6.1
Can anyone help me? :/ or is there another way to send mail?
Thanks