cURL / Mailing Lists / curl-library / Single Mail


RE: SMTP connection ends with HELP command

From: Patrick Monnerat <>
Date: Wed, 28 Jan 2015 19:12:37 +0100

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


List admin:
Received on 2015-01-28