I wrote a little C-program which uses libcurl and it's SMTP-capabilities in particular.
Since the version/the supported protocols of host-installed libcurl doesn't quite fit my needs I compiled a version of curl/libcurl in my home-directory.
I configured my PATH so I can use my own compiled version of curl, curl -V
looks fine, exactly how I need it.
With help of curl-config
I compiled my program like this:
gcc -I/home/me/include -o my-program my-program.c -L/home/me/lib -lcurl
If I call the programm from the shell it works like expected without any errors.
It gets tricky if I call it through cron which leads to this error:
curl_easy_perform() failed: Unsupported protocol
The Unsupported protocol
error indicates that the wrong build of libcurl is used because the host-installed curl indeed does not have SMTP-support.
I already tried setting PATH like in the shell (/home/me/bin) and C_INCLUDE_PATH like suggested here (/home/me/include) but neither solved my problem.
Where is my fallacy? Any suggestions?
Thanks, Tim