Estimados, consulta
He tratado con la ayuda de la IA de crear una funcion para leer correos, de una cuenta nuestra, pop3, gmail, en fin lo ideal desde cualquier cuenta, la idea es leer el asunto, contenido y descargar el archivo adjunto para automatizar un proceso ... pero el codigo que me dan da errores y lo que usan TSocket o Curl no es algo que maneje muy bien ... alguien tendra un ejemplo de como leer correos ?
Gracias
Leer mails
-
- Posts: 562
- Joined: Fri Oct 07, 2005 2:17 pm
- Location: Lima - Peru
- Been thanked: 3 times
- Contact:
Leer mails
Enrrique Vertiz Pitta
Lima-Peru
xHb 1.23.1026X, Fwh 25.01, BCC74, MySQL 8.0.X, SQLLIB 1.9m
Lima-Peru
xHb 1.23.1026X, Fwh 25.01, BCC74, MySQL 8.0.X, SQLLIB 1.9m
- Antonio Linares
- Site Admin
- Posts: 42715
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 93 times
- Been thanked: 103 times
- Contact:
Re: Leer mails
Estimado Enrique,
En FWH 25.01 en la carpeta FWH\samples\gmail\ tienes un ejemplo completo testgmail.prg desarrollado por Lailton.
Si no tienes dicha carpeta, contacta conmigo por whatsapp y te la facilito.
En FWH 25.01 en la carpeta FWH\samples\gmail\ tienes un ejemplo completo testgmail.prg desarrollado por Lailton.
Si no tienes dicha carpeta, contacta conmigo por whatsapp y te la facilito.
-
- Posts: 562
- Joined: Fri Oct 07, 2005 2:17 pm
- Location: Lima - Peru
- Been thanked: 3 times
- Contact:
Re: Leer mails
Gracias, no la tengo, ya te escribi
Enrrique Vertiz Pitta
Lima-Peru
xHb 1.23.1026X, Fwh 25.01, BCC74, MySQL 8.0.X, SQLLIB 1.9m
Lima-Peru
xHb 1.23.1026X, Fwh 25.01, BCC74, MySQL 8.0.X, SQLLIB 1.9m
-
- Posts: 562
- Joined: Fri Oct 07, 2005 2:17 pm
- Location: Lima - Peru
- Been thanked: 3 times
- Contact:
Re: Leer mails
Saludos Antonio
Me sale error al compilar Testgmail, el mismo con xHarbour y Harbour, pregunte a la IA y me dice que revise el archivo prsht.h que es de Borland 77 ??, pero este mensaje solo sale con este prg, compile todos los samples y compilan casi todos y algunos dan error, pero no este, que podra ser ?? (abajo la line de error)
Error prsht.h 918 9: '#endif' before '#if'
* Linking errors *
Me sale error al compilar Testgmail, el mismo con xHarbour y Harbour, pregunte a la IA y me dice que revise el archivo prsht.h que es de Borland 77 ??, pero este mensaje solo sale con este prg, compile todos los samples y compilan casi todos y algunos dan error, pero no este, que podra ser ?? (abajo la line de error)
Error prsht.h 918 9: '#endif' before '#if'
* Linking errors *
Enrrique Vertiz Pitta
Lima-Peru
xHb 1.23.1026X, Fwh 25.01, BCC74, MySQL 8.0.X, SQLLIB 1.9m
Lima-Peru
xHb 1.23.1026X, Fwh 25.01, BCC74, MySQL 8.0.X, SQLLIB 1.9m
- Antonio Linares
- Site Admin
- Posts: 42715
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 93 times
- Been thanked: 103 times
- Contact:
Re: Leer mails
Enrique,
Modifica testgmail.rc así:
y copia libcurl.dll desde FWH\samples a esa carpeta
Modifica testgmail.rc así:
Code: Select all | Expand
#include <windows.h>
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
GMAIL DIALOGEX DISCARDABLE 6, 18, 346, 78
STYLE DS_SHELLFONT|WS_POPUP|DS_MODALFRAME|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
CAPTION "GMAIL oAUTH"
FONT 8, "Tahoma"
{
CONTROL "Connect with Gmail", 4001, "Button", WS_TABSTOP, 103, 21, 140, 36
CONTROL "", 4002, "Static", SS_BITMAP|SS_CENTERIMAGE|WS_BORDER, 8, 8, 60, 60
CONTROL "This is a label:", 4003, "Static", WS_GROUP, 76, 8, 200, 8
CONTROL "This is a label:", 4004, "Static", WS_GROUP, 76, 24, 200, 8
CONTROL "Disconnect", 4005, "Button", WS_TABSTOP, 80, 52, 56, 14
CONTROL "Send Mail", 4006, "Button", WS_TABSTOP, 280, 4, 58, 20
}
- Antonio Linares
- Site Admin
- Posts: 42715
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 93 times
- Been thanked: 103 times
- Contact:
Re: Leer mails
Para construirlo:
go.bat
testgmail.hbp
go.bat
Code: Select all | Expand
set path=c:\bcc77\bin
c:\harbour\bin\win\bcc\hbmk2 testgmail.hbp -comp=bcc
Code: Select all | Expand
-gui
-Ic:\fwh\include
testgmail.prg
testgmail.rc
-Lc:\fwh\lib
-lFiveH
-lFiveHC
xhb.hbc
hbct.hbc
hbmzip.hbc
hbziparc.hbc
hbcurl.hbc
-
- Posts: 562
- Joined: Fri Oct 07, 2005 2:17 pm
- Location: Lima - Peru
- Been thanked: 3 times
- Contact:
Re: Leer mails
Gracias, ya compilo, vamos a cambiar las credenciales y probar.
Enrrique Vertiz Pitta
Lima-Peru
xHb 1.23.1026X, Fwh 25.01, BCC74, MySQL 8.0.X, SQLLIB 1.9m
Lima-Peru
xHb 1.23.1026X, Fwh 25.01, BCC74, MySQL 8.0.X, SQLLIB 1.9m