Using gmail

User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Using gmail

Post by Antonio Linares »

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/7369 ... g-problems

Or, did you already got it ? :-)

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

Antonio Linares
www.fivetechsoft.com
User avatar
Massimo Linossi
Posts: 474
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Using gmail

Post by Massimo Linossi »

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.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Using gmail

Post by Antonio Linares »

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
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Using gmail

Post by Silvio.Falconi »

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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Massimo Linossi
Posts: 474
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Using gmail

Post by Massimo Linossi »

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.
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Using gmail

Post by TimStone »

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
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Massimo Linossi
Posts: 474
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Using gmail

Post by Massimo Linossi »

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
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Using gmail

Post by TimStone »

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
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: Using gmail

Post by vilian »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Using gmail

Post by Antonio Linares »

Vilian,

You need to link libcurl.lib too
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: Using gmail

Post by vilian »

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
Post Reply