libcurl.pbi

Share your advanced PureBasic knowledge/code with the community.
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: libcurl.pbi

Post by infratec »

What you are doing has nothing to do with the informartions I provided to you.

Here is an other link (maybe this one is easier to understand):

https://email2go.io/blog/embedded-images-in-html-email
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: libcurl.pbi

Post by Kwai chang caine »

Thanks a lot INFRATEC for this great and very usefull thread 8)
ImageThe happiness is a road...
Not a destination
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: libcurl.pbi

Post by infratec »

Added 2 constants used for SFTP examples.

Added an example:

SFTP_get.pb
Last edited by infratec on Thu Jan 26, 2023 12:36 pm, edited 1 time in total.
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: libcurl.pbi

Post by infratec »

Added again a few missing constants.

Added examples:

SFTP_upload.pb
SFTP_uploadresume.pb
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: libcurl.pbi

Post by infratec »

Updated the dlls to version 7.87.0
drgolf
User
User
Posts: 90
Joined: Tue Mar 03, 2009 3:40 pm
Location: france

Re: libcurl.pbi

Post by drgolf »

Hello,

Very nice lib.

On windows, pb 6.01 b4 ASM i have an error :
unresolved external symbol '_curl_easy_escape'
and '_curl_easy_unescape'

Work fine on C backend.

Test with example ; SMTPS.pb

I have included without sucess :

Code: Select all

Import "wsock32.lib"
EndImport
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: libcurl.pbi

Post by infratec »

It was in x64 version.

It is fixed now.
drgolf
User
User
Posts: 90
Joined: Tue Mar 03, 2009 3:40 pm
Location: france

Re: libcurl.pbi

Post by drgolf »

Thanx,

New version work fine with pb6.01 b5
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: libcurl.pbi

Post by infratec »

Updated libcurl.dll to 8.0.1

Changed all includes in the examples to libcurl.pbi and also changed the name from LibCurl.pbi to libcurl.pbi.
This avoids trouble in linux and macOS.
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: libcurl.pbi

Post by infratec »

Added some missing stuff for multi interface.

Added an example for asynchronous usage.
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: libcurl.pbi

Post by infratec »

Updated the libcurl dll to 8.1.2

Changed the data handling to be thread safe. (if you don't use your own write function)
Every process use now it's own variable for the received data.
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: libcurl.pbi

Post by infratec »

HTTPInfoI() returns now "0" instead of "" as #PB_HTTP_StatusCode if something went wrong.
Now it has the same behaviour as the original version.
loulou2522
Enthusiast
Enthusiast
Posts: 495
Joined: Tue Oct 14, 2014 12:09 pm

Re: libcurl.pbi

Post by loulou2522 »

Hi Infratec
How can i attach a binary file to an email sent with libcurl
THanks in advance
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: libcurl.pbi

Post by infratec »

You cannot send a binary file via email. You need to Base64 encoding.
That's one of the reasons why you should not attach large files to an e-mail, because the size is growing by 33%.
And the receivers mailbox can avoid it.

look inside: OutLookEMail.pb

Additional:
https://curl.se/libcurl/c/smtp-mime.html

https://stackoverflow.com/questions/147 ... c-language
drgolf
User
User
Posts: 90
Joined: Tue Mar 03, 2009 3:40 pm
Location: france

Re: libcurl.pbi

Post by drgolf »

Hello !

I use LibCurl with IMAP for access mailbox.
How can i access mail in trash or junk dir ?

I can list mail in INBOX and for other dirs ?
Post Reply