Mariusz Gogulski wrote: > Could you point me what do I do wrong? > curl_easy_setopt(hCurl, CURLOPT_READDATA, &mime); //mime - handle to opened mime
I don't know if it's the cause of your trouble: you set READDATA to a pointer to "mime" that has very little change to be of FILE type (declaration not shown in your post), but do not set the READFUNCTION accordingly: In that case, the fread() function is used to get the mail data from a FILE* handle that has the value of &mime, which has all chances to fail :-( Either use a real opened FILE* descriptor instead of &mime, or set CURLOPT_READFUNCTION to a function that knows how to get data from &mime. Patrick ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
