Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mimetype issues #47

Open
jbfsoftware opened this issue Jul 18, 2020 · 0 comments
Open

Mimetype issues #47

jbfsoftware opened this issue Jul 18, 2020 · 0 comments

Comments

@jbfsoftware
Copy link

Hi,
I have been using your library happily to use curl with delphi.
I ran into a few issues when using SMTP and attachments.

  1. Function curl_mime_type. Your function requires a HCurlMime argument, but the curl function seems to need a HCurlMimeType argument.
  2. For curl_easy_setopt I could not use a TCurlMimeOption. (CURLOPT_MIMEPOST). I needed to add an overloaded version of the function curl_easy_setopt.

Running a diff on your latest source of Curl.Lib.pas and my adjusted version I get this:

1760c1760
< function curl_mime_type(part : HCurlMime; mimetype : PAnsiChar) : TCurlCode;
---
> function curl_mime_type(part : HCurlMimePart; mimetype : PAnsiChar) : TCurlCode;
2616a2616,2620
> function curl_easy_setopt(
>         curl : HCurl;
> 		option : TCurlMimeOption;
> 		data : HCurlMime) : TCurlCode;  overload; inline;
> 
3062a3067,3074
> function curl_easy_setopt(
>         curl : HCurl;
> 		option : TCurlMimeOption;
> 		data : HCurlMime) : TCurlCode;
> begin
>   Result := curl_easy_setopt_initial(curl, option, NativeUInt(data));
>   end;
> 

I wanted to let you know, it seems a good improvement to me to include this into your original.
Greetings, JP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant