FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Using gmail
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Using gmail
Posted: Wed May 15, 2013 07:02 PM
Massimo,

I think the fastest way to solve this would be to ask Patrick if they already have a libcurl.lib for xhb.com

If not, then we could build it this way:
http://stackoverflow.com/questions/7369663/libcurl-release-static-lib-linking-problems

Or, did you already got it ? :-)

I am going to review the attachments...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Using gmail
Posted: Wed May 15, 2013 07:09 PM

Antonio,
no, I didn't find the library.
Maybe is faster to use the CDO, as you make in the beginning of this topic. I've tried and it works for sending emails.
Now I'm trying to find a way for reading all emails from Gmail account.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Using gmail
Posted: Wed May 15, 2013 07:16 PM

Massimo,

I searched for CDO and POP and gmail, and couldn't find an example. If we find it then we could adapt it to Harbour.

The curl based code retrieves a XML file and inside that file there are "hrefs" that point to each original email, so if you want to download it, first you have to (automatically) navigate to gmail and read the email and save the attachments, etc :-)

Have you asked Patrick for the lib ? I would happy help, but lets first check if it already exists, so we avoid building it :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Using gmail
Posted: Wed May 22, 2013 03:17 PM

Antonio,
I linked hbcurl.lib ( I found it on dowload list) for xharbour

when I compile the test it make these errors

Project: test, Environment: xFive_Pelles:
[1]:Harbour.Exe test.prg /m /n0 /gc1 /es2 /iC:\Work\fwh\include /ic:\work\xHarbour\Include /jit_IT.hil /iinclude;c:\work\fwh\include;c:\work\xHarbour\include /oObj\test.c
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6717)
Copyright 1999-2010, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'test.prg'...
Generating international list to 'it_IT.hil'...
Lines 87, Functions/Procedures 3
Generating C source output to 'Obj\test.c'...
Done.
[1]:Bcc32.Exe -M -c -O2 -tW -v- -X -DHB_FM_STATISTICS_OFF -DHB_NO_DEFAULT_API_MACROS -DHB_NO_DEFAULT_STACK_MACROS -DHB_OS_WIN_32 -IC:\Work\fwh\include -IC:\Work\bcc582\Include;c:\work\xHarbour\Include -nObj Obj\test.c
Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
Obj\test.c:
[1]:iLink32.Exe -Gn -aa -Tpe -s @test.bcl
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_curl_global_init' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_init' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_formadd' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_slist_append' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_setopt' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_perform' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_formfree' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_slist_free_all' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_cleanup' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_global_cleanup' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_HB_FUN_CURL_EASY_RESET' referenced from C:\WORK\ERRORI\GMAIL\OBJ\TEST.OBJ

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Using gmail
Posted: Fri Jun 28, 2013 05:56 AM

Hi Antonio.
I want only to tell you that we have solved the problem using Mailbee.
Now we can read the Exchange server, collecting all the new emails and save their corresponding attachments
into a specific folder.
Thanks a lot for your suggestions.
Massimo.

Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Using gmail
Posted: Fri Jun 28, 2013 05:54 PM

Massimo,

So you now send and receive emails using MailBee ? Isn't that .NET ? I'd love to see samples of what you can now do.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Using gmail
Posted: Fri Jun 28, 2013 06:08 PM

Not sending, it wasn't my purpose. But for reading and saving attachments is running perfectly.
I think that in little time, reading all the examples written in VB and in DELPHY you can make everything.
If you have some time, you can download it and try for 30 days. Is a very good product.
Massimo

Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Using gmail
Posted: Fri Jun 28, 2013 07:19 PM

I am using CDO for sending to all platforms now. Eventually I want to have the ability to read emails from a specified account.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: Using gmail
Posted: Wed Feb 19, 2020 08:11 PM
Hi Silvio,
Did you solve this problem ?
Silvio.Falconi wrote:Antonio,
I linked hbcurl.lib ( I found it on dowload list) for xharbour

when I compile the test it make these errors

Project: test, Environment: xFive_Pelles:
[1]:Harbour.Exe test.prg /m /n0 /gc1 /es2 /iC:\Work\fwh\include /ic:\work\xHarbour\Include /jit_IT.hil /iinclude;c:\work\fwh\include;c:\work\xHarbour\include /oObj\test.c
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6717)
Copyright 1999-2010, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'test.prg'...
Generating international list to 'it_IT.hil'...
Lines 87, Functions/Procedures 3
Generating C source output to 'Obj\test.c'...
Done.
[1]:Bcc32.Exe -M -c -O2 -tW -v- -X -DHB_FM_STATISTICS_OFF -DHB_NO_DEFAULT_API_MACROS -DHB_NO_DEFAULT_STACK_MACROS -DHB_OS_WIN_32 -IC:\Work\fwh\include -IC:\Work\bcc582\Include;c:\work\xHarbour\Include -nObj Obj\test.c
Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
Obj\test.c:
[1]:iLink32.Exe -Gn -aa -Tpe -s @test.bcl
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_curl_global_init' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_init' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_formadd' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_slist_append' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_setopt' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_perform' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_formfree' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_slist_free_all' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_cleanup' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_global_cleanup' referenced from C:\WORK\ERRORI\GMAIL\HBCURL.LIB|hbcurl
Error: Unresolved external '_HB_FUN_CURL_EASY_RESET' referenced from C:\WORK\ERRORI\GMAIL\OBJ\TEST.OBJ
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Using gmail
Posted: Thu Feb 20, 2020 10:26 AM

Vilian,

You need to link libcurl.lib too

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: Using gmail
Posted: Thu Feb 20, 2020 10:55 AM

I think the problem is with hbcurl.lib that is in instalation of Harbour. I made the download from contrib and everything is fine now.
Thanks.

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil

Continue the discussion