Señores, alguien tiene un ejemplo de programa que recibe e-mails? Tengo que recuperar mi correo electrónico directamente desde mi programa, es posible?
Gracias.
Saludos.
// Testing FiveWin new Internet incoming mail (POP3 protocol) Class
#include "FiveWin.ch"
static oWnd
//----------------------------------------------------------------------------//
function Main()
local oBar
DEFINE WINDOW oWnd TITLE "Receiving Internet Mail from FiveWin"
DEFINE BUTTONBAR oBar _3D OF oWnd
DEFINE BUTTON OF oBar ACTION GetMail() TOOLTIP "Get Mail"
SET MESSAGE OF oWnd TO "Ready" NOINSET DATE TIME KEYBOARD
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
function GetMail()
local oInMail
local cIp
if WsaStartup() == 0
cIp := gethostbyname( "pop.gmail.com" )
WsaCleanUp()
endif
oWnd:SetMsg( "Geting Internet email..." )
oInMail = TPop4():New( cIp,, "miusuario", "miclave" )
oInMail:bConnecting = { || oWnd:SetMsg( "Connecting to " + cIp ) }
oInMail:bConnected = { || oWnd:SetMsg( "Connected" ) }
oInMail:bDone = { || ReadEmails( oInMail ) }
oInMail:GetMail()
return nil
//----------------------------------------------------------------------------//
function ReadEmails( oInMail )
local n, cTxt := ""
MsgInfo( "Total emails: " + Str( Len( oInMail:aMsgs ) ) )
for n = 1 to Len( oInMail:aMsgs )
cTxt += oInMail:aMsgs[ n ] + CRLF + "--- FINAL DE ESTE MAIL ---" + CRLF
next
memowrit( "email.txt", cTxt )
return nil
//----------------------------------------------------------------------------//
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for xHarbour 8.09 - Sep. 2008 xHarbour development power ³Ü
ECHO ³ (c) FiveTech, 1993-2008 for Microsoft Windows 95/98/NT/2000/ME/XP/Vista ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
ECHO Compiling...
set hdir=\xharbour
set bcdir=\bcc
%hdir%\bin\harbour %1 /n /i..\include;%hdir%\include /w /p %2 %3 > clip.log
@type clip.log
IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT
echo -O2 -e%1.exe -I%hdir%\include;\fwh\include %1.c > b32.bc
%bcdir%\bin\bcc32 -M -c -v @b32.bc
:ENDCOMPILE
IF EXIST %1.rc %bcdir%\bin\brc32 -r %1
echo c0w32.obj + > b32.bc
echo %1.obj, + >> b32.bc
echo %1.exe, + >> b32.bc
echo %1.map, + >> b32.bc
echo \fwh\lib\Fivehx.lib \fwh\lib\FiveHC.lib + >> b32.bc
echo %hdir%\lib\rtl.lib + >> b32.bc
echo %hdir%\lib\vm.lib + >> b32.bc
echo %hdir%\lib\gtgui.lib + >> b32.bc
echo %hdir%\lib\lang.lib + >> b32.bc
echo %hdir%\lib\macro.lib + >> b32.bc
echo %hdir%\lib\rdd.lib + >> b32.bc
echo %hdir%\lib\dbfntx.lib + >> b32.bc
echo %hdir%\lib\dbfcdx.lib + >> b32.bc
echo %hdir%\lib\dbffpt.lib + >> b32.bc
echo %hdir%\lib\hbsix.lib + >> b32.bc
echo %hdir%\lib\debug.lib + >> b32.bc
echo %hdir%\lib\common.lib + >> b32.bc
echo %hdir%\lib\pp.lib + >> b32.bc
echo %hdir%\lib\pcrepos.lib + >> b32.bc
echo tpop4.obj + >> b32.bc
rem Uncomment these two lines to use Advantage RDD
rem echo %hdir%\lib\rddads.lib + >> b32.bc
rem echo %hdir%\lib\Ace32.lib + >> b32.bc
echo %bcdir%\lib\cw32.lib + >> b32.bc
echo %bcdir%\lib\import32.lib + >> b32.bc
echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc
echo %bcdir%\lib\psdk\rasapi32.lib + >> b32.bc
echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\msimg32.lib + >> b32.bc
echo %bcdir%\lib\psdk\iphlpapi.lib, >> b32.bc
IF EXIST %1.res echo %1.res >> b32.bc
rem uncomment this line to use the debugger and comment the following one
rem %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc
%bcdir%\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built
%1
GOTO EXIT
ECHO
rem delete temporary files
@del %1.c
:LINKERROR
ECHO * There are errors
GOTO EXIT
:SINTAX
ECHO SYNTAX: Build [Program] {-- No especifiques la extensi¢n PRG
ECHO {-- Don't specify .PRG extension
GOTO EXIT
:NOEXIST
ECHO The specified PRG %1 does not exist
:EXIT
// FiveWin Internet incomming mail Class
#include "FiveWin.ch"
// different session status
// CONNECT
#define ST_CONNECTING 1
#define ST_IDENTIFY1 2
#define ST_IDENTIFY2 3
#define ST_STAT 99
#define ST_REQLIST 4
#define ST_IDENTIFY4 5
#define ST_IDENTIFY5 6
#define ST_SENDBODY 7
#define ST_SENDQUIT 8
#define ST_ENDED 10
#define ST_REQNEXT 98
#define ST_REQMSG 96
#define ST_DELMSG 97
// STOR
#define ST_STOR_PORT "ST_PORT"
#define ST_STOR_OPENCONN "ST_OPENCONN"
#define ST_STOR_START "ST_START"
#define CONNECT_OK "220"
#define HELLO_OK "250"
#define MAILFROM_OK "250"
#define MAILTO_OK "250"
#define DATA_OK "354"
#define LOGIN_OK "230"
#define MSG_OK "250"
#define CLOSE_OK "221"
#define ENDMSG "."
#define ST_NOOP 6
#define ST_OK "+OK"
//----------------------------------------------------------------------------//
CLASS TPop4
DATA oSocket // socket used during the Control session
DATA nPort
DATA User
DATA Pass
DATA lOk
DATA aMsgs
DATA nAtMsg
DATA cIPServer // IP of the mail server
DATA AllOk
DATA nStatus // Temporary session status
DATA lDelMsgs
DATA bConnecting // Action to perform while trying to connect to the server
DATA bConnected // Action to perform when already connected to the server
DATA bDone // Action to perform when Msgs have been retrieved
METHOD New( cIPServer, nPort, User, Pass ) CONSTRUCTOR
METHOD GetMail()
METHOD OnRead( oSocket )
METHOD LogError( cData, oSocket )
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( cIPServer, nPort, User, Pass ) CLASS TPop4
DEFAULT nPort := 110
::AllOk := .f.
::cIPServer := cIPServer
::User := User
::Pass := Pass
::nStatus := ST_CONNECTING
::nPort := nPort
::lDelMsgs := .t.
return self
//----------------------------------------------------------------------------//
METHOD GetMail() CLASS TPop4
::oSocket := TSocket():New( ::nPort )
::oSocket:bRead = { | o | ::OnRead( o ) }
::oSocket:Connect( ::cIpServer )
return Self
//----------------------------------------------------------------------------//
METHOD OnRead( oSocket ) CLASS TPop4
local cData := oSocket:GetData()
local rCode := SubStr( cData, 1 ,3 )
local cMsg := SubStr( cData, 3 )
local cCommand := ""
local n
//msginfo( rCode )
//msginfo( cMsg )
do case
case ::nStatus == ST_CONNECTING
if rCode == ST_OK
cCommand = "USER " + ::User + CRLF
::nStatus = ST_IDENTIFY1
if ::bConnecting != nil
Eval( ::bConnecting, Self )
endif
else
::LogError( cData, oSocket )
endif
case ::nStatus == ST_IDENTIFY1
if rCode == ST_OK
cCommand = "PASS " + ::Pass + CRLF
::nStatus = ST_IDENTIFY2
else
::LogError( cData, oSocket )
endif
case ::nStatus == ST_IDENTIFY2
if rCode == ST_OK
cCommand = "STAT " + CRLF
::nStatus = ST_STAT
else
::LogError( cData, oSocket )
endif
case ::nStatus == ST_STAT
if rCode == ST_OK
if ::bConnected != nil
Eval( ::bConnected, Self )
endif
cData = StrTran( cData, " ", "&" ) + "&"
::aMsgs := Array( Val( StrToken( cData, 2, "&" ) ) )
for n = 1 to Len( ::aMsgs )
::aMsgs[ n ] = ""
next
if Len( ::aMsgs ) == 0
cCommand = "QUIT" + CRLF
::nStatus = ST_SENDQUIT
else
::nAtMsg = 1
cCommand = "RETR " + AllTrim( Str( 1, 4, 0 ) )+ CRLF
::nStatus = ST_REQMSG
endif
else
::LogError( cData, oSocket )
endif
case ::nStatus == ST_DELMSG
if rCode == ST_OK
if ::nAtMsg < Len( ::aMsgs )
cCommand = "RETR " + AllTrim( Str( ++::nAtMsg, 4, 0 ) ) + CRLF
::nStatus = ST_REQMSG
else
cCommand = "QUIT" + CRLF
::nStatus = ST_SENDQUIT
endif
else
::LogError( cData, oSocket )
endif
case ::nStatus == ST_REQMSG
if ::nAtMsg <= Len( ::aMsgs )
::aMsgs[ ::nAtMsg ] += cData
if At( Chr( 13 ) + Chr( 10 ) + "." + Chr( 13 ) + Chr( 10 ), cData ) > 0
if ::lDelMsgs
cCommand = "DELE " + AllTrim( Str( ::nAtMsg, 4, 0 ) ) + CRLF
::nStatus = ST_DELMSG
else
cCommand = "RETR " + AllTrim( Str( ++::nAtMsg, 4, 0 ) ) + CRLF
::nStatus = ST_REQMSG
endif
else
::nStatus = ST_REQMSG
endif
else
cCommand = "QUIT" + CRLF
::nStatus = ST_SENDQUIT
::AllOk = .t.
endif
case ::nStatus == ST_SENDQUIT
if rCode == ST_OK
cCommand = ""
oSocket:End()
::nStatus = ST_ENDED
::AllOk = .t.
else
::LogError( cData, oSocket )
endif
endcase
msginfo( cCommand )
if ! Empty( cCommand )
oSocket:SendData( cCommand )
if cCommand == "QUIT" + CRLF
if ::bDone != nil
Eval( ::bDone, Self )
endif
endif
endif
return nil
//----------------------------------------------------------------------------//
METHOD LogError( cData, oSocket ) CLASS TPop4
oSocket:End()
LogFile( "MailErr.log", { ::nStatus,cData } )
::AllOk := .f.
return nil
//----------------------------------------------------------------------------//
oWnd:SetMsg( "Geting Internet email..." )
oInMail = TPop4():New( cIp,, "danyleon82@gmail.com", "mipassword" )
oInMail:bConnecting = { || oWnd:SetMsg( "Connecting to " + cIp ) }
oInMail:bConnected = { || oWnd:SetMsg( "Connected" ) }
oInMail:bDone = { || ReadEmails( oInMail ) }
oInMail:GetMail()
// Testing FiveWin new Internet incoming mail (POP3 protocol) Class
#include "FiveWin.ch"
static oWnd
//----------------------------------------------------------------------------//
function Main()
local oBar
DEFINE WINDOW oWnd TITLE "Receiving Internet Mail from FiveWin"
DEFINE BUTTONBAR oBar _3D OF oWnd
DEFINE BUTTON OF oBar ACTION GetMail() TOOLTIP "Get Mail"
SET MESSAGE OF oWnd TO "Ready" NOINSET DATE TIME KEYBOARD
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
function GetMail()
local oInMail
local cIp
if WsaStartup() == 0
cIp := gethostbyname( "pop.gmail.com" ) //"mail.google.com" )
WsaCleanUp()
endif
oWnd:SetMsg( "Geting Internet email..." )
oInMail = TPop4():New( cIp,, "sistemas.amc@gmail.com", "miclave" ) // mail server IP
oInMail:bConnecting = { || oWnd:SetMsg( "Connecting to " + cIp ) }
oInMail:bConnected = { || oWnd:SetMsg( "Connected" ) }
oInMail:bDone = { || ReadEmails( oInMail ) }
// oInmail:nStatus := 99 //ST_CONNECTING
oInMail:GetMail()
return nil
//----------------------------------------------------------------------------//
function ReadEmails( oInMail )
local n, cTxt := ""
MsgInfo( "Total emails: " + Str( Len( oInMail:aMsgs ) ) )
for n = 1 to Len( oInMail:aMsgs )
cTxt += oInMail:aMsgs[ n ] + CRLF + "FIN ------- FIN" + CRLF
next
memowrit( "pop3.txt", cTxt )
return nil
//----------------------------------------------------------------------------//
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for xHarbour 8.09 - Sep. 2008 xHarbour development power ³Ü
ECHO ³ (c) FiveTech, 1993-2008 for Microsoft Windows 95/98/NT/2000/ME/XP/Vista ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
ECHO Compiling...
set hdir=\xharbour
set bcdir=\bcc
%hdir%\bin\harbour %1 /n /i..\include;%hdir%\include /w /p %2 %3 > clip.log
@type clip.log
IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT
echo -O2 -e%1.exe -I%hdir%\include;\fwh\include %1.c > b32.bc
%bcdir%\bin\bcc32 -M -c -v @b32.bc
:ENDCOMPILE
IF EXIST %1.rc %bcdir%\bin\brc32 -r %1
echo c0w32.obj + > b32.bc
echo %1.obj, + >> b32.bc
echo %1.exe, + >> b32.bc
echo %1.map, + >> b32.bc
echo \fwh\lib\Fivehx.lib \fwh\lib\FiveHC.lib + >> b32.bc
echo %hdir%\lib\rtl.lib + >> b32.bc
echo %hdir%\lib\vm.lib + >> b32.bc
echo %hdir%\lib\gtgui.lib + >> b32.bc
echo %hdir%\lib\lang.lib + >> b32.bc
echo %hdir%\lib\macro.lib + >> b32.bc
echo %hdir%\lib\rdd.lib + >> b32.bc
echo %hdir%\lib\dbfntx.lib + >> b32.bc
echo %hdir%\lib\dbfcdx.lib + >> b32.bc
echo %hdir%\lib\dbffpt.lib + >> b32.bc
echo %hdir%\lib\hbsix.lib + >> b32.bc
echo %hdir%\lib\debug.lib + >> b32.bc
echo %hdir%\lib\common.lib + >> b32.bc
echo %hdir%\lib\pp.lib + >> b32.bc
echo %hdir%\lib\pcrepos.lib + >> b32.bc
echo tpop4.obj + >> b32.bc
rem Uncomment these two lines to use Advantage RDD
rem echo %hdir%\lib\rddads.lib + >> b32.bc
rem echo %hdir%\lib\Ace32.lib + >> b32.bc
echo %bcdir%\lib\cw32.lib + >> b32.bc
echo %bcdir%\lib\import32.lib + >> b32.bc
echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc
echo %bcdir%\lib\psdk\rasapi32.lib + >> b32.bc
echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\msimg32.lib + >> b32.bc
echo %bcdir%\lib\psdk\iphlpapi.lib, >> b32.bc
IF EXIST %1.res echo %1.res >> b32.bc
rem uncomment this line to use the debugger and comment the following one
rem %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc
%bcdir%\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built
%1
GOTO EXIT
ECHO
rem delete temporary files
@del %1.c
:LINKERROR
ECHO * There are errors
GOTO EXIT
:SINTAX
ECHO SYNTAX: Build [Program] {-- No especifiques la extensi¢n PRG
ECHO {-- Don't specify .PRG extension
GOTO EXIT
:NOEXIST
ECHO The specified PRG %1 does not exist
:EXIT
// FiveWin Internet incomming mail Class
#include "FiveWin.ch"
// different session status
// CONNECT
#define ST_CONNECTING 1
#define ST_IDENTIFY1 2
#define ST_IDENTIFY2 3
#define ST_STAT 99
#define ST_REQLIST 4
#define ST_IDENTIFY4 5
#define ST_IDENTIFY5 6
#define ST_SENDBODY 7
#define ST_SENDQUIT 8
#define ST_ENDED 10
#define ST_REQNEXT 98
#define ST_REQMSG 96
#define ST_DELMSG 97
// STOR
#define ST_STOR_PORT "ST_PORT"
#define ST_STOR_OPENCONN "ST_OPENCONN"
#define ST_STOR_START "ST_START"
#define CONNECT_OK "220"
#define HELLO_OK "250"
#define MAILFROM_OK "250"
#define MAILTO_OK "250"
#define DATA_OK "354"
#define LOGIN_OK "230"
#define MSG_OK "250"
#define CLOSE_OK "221"
#define ENDMSG "."
#define ST_NOOP 6
#define ST_OK "+OK"
//----------------------------------------------------------------------------//
CLASS TPop4
DATA oSocket // socket used during the Control session
DATA nPort
DATA User
DATA Pass
DATA lOk
DATA aMsgs
DATA nAtMsg
DATA cIPServer // IP of the mail server
DATA AllOk
DATA nStatus // Temporary session status
DATA lDelMsgs
DATA bConnecting // Action to perform while trying to connect to the server
DATA bConnected // Action to perform when already connected to the server
DATA bDone // Action to perform when Msgs have been retrieved
METHOD New( cIPServer, nPort, User, Pass ) CONSTRUCTOR
METHOD GetMail()
METHOD OnRead( oSocket )
METHOD LogError( cData, oSocket )
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( cIPServer, nPort, User, Pass ) CLASS TPop4
DEFAULT nPort := 110
::AllOk := .f.
::cIPServer := cIPServer
::User := User
::Pass := Pass
::nStatus := ST_CONNECTING
::nPort := nPort
::lDelMsgs := .t.
return self
//----------------------------------------------------------------------------//
METHOD GetMail() CLASS TPop4
::oSocket := TSocket():New( ::nPort )
::oSocket:bRead = { | o | ::OnRead( o ) }
::oSocket:Connect( ::cIpServer )
return Self
//----------------------------------------------------------------------------//
METHOD OnRead( oSocket ) CLASS TPop4
local cData := oSocket:GetData()
local rCode := SubStr( cData, 1 ,3 )
local cMsg := SubStr( cData, 3 )
local cCommand := ""
local n
//msginfo( rCode )
//msginfo( cMsg )
do case
case ::nStatus == ST_CONNECTING
if rCode == ST_OK
cCommand = "USER " + ::User + CRLF
::nStatus = ST_IDENTIFY1
if ::bConnecting != nil
Eval( ::bConnecting, Self )
endif
else
::LogError( cData, oSocket )
endif
case ::nStatus == ST_IDENTIFY1
if rCode == ST_OK
cCommand = "PASS " + ::Pass + CRLF
::nStatus = ST_IDENTIFY2
else
::LogError( cData, oSocket )
endif
case ::nStatus == ST_IDENTIFY2
if rCode == ST_OK
cCommand = "STAT " + CRLF
::nStatus = ST_STAT
else
::LogError( cData, oSocket )
endif
case ::nStatus == ST_STAT
if rCode == ST_OK
if ::bConnected != nil
Eval( ::bConnected, Self )
endif
cData = StrTran( cData, " ", "&" ) + "&"
::aMsgs := Array( Val( StrToken( cData, 2, "&" ) ) )
for n = 1 to Len( ::aMsgs )
::aMsgs[ n ] = ""
next
if Len( ::aMsgs ) == 0
cCommand = "QUIT" + CRLF
::nStatus = ST_SENDQUIT
else
::nAtMsg = 1
cCommand = "RETR " + AllTrim( Str( 1, 4, 0 ) )+ CRLF
::nStatus = ST_REQMSG
endif
else
::LogError( cData, oSocket )
endif
case ::nStatus == ST_DELMSG
if rCode == ST_OK
if ::nAtMsg < Len( ::aMsgs )
cCommand = "RETR " + AllTrim( Str( ++::nAtMsg, 4, 0 ) ) + CRLF
::nStatus = ST_REQMSG
else
cCommand = "QUIT" + CRLF
::nStatus = ST_SENDQUIT
endif
else
::LogError( cData, oSocket )
endif
case ::nStatus == ST_REQMSG
if ::nAtMsg <= Len( ::aMsgs )
::aMsgs[ ::nAtMsg ] += cData
if At( Chr( 13 ) + Chr( 10 ) + "." + Chr( 13 ) + Chr( 10 ), cData ) > 0
if ::lDelMsgs
cCommand = "DELE " + AllTrim( Str( ::nAtMsg, 4, 0 ) ) + CRLF
::nStatus = ST_DELMSG
else
cCommand = "RETR " + AllTrim( Str( ++::nAtMsg, 4, 0 ) ) + CRLF
::nStatus = ST_REQMSG
endif
else
::nStatus = ST_REQMSG
endif
else
cCommand = "QUIT" + CRLF
::nStatus = ST_SENDQUIT
::AllOk = .t.
endif
case ::nStatus == ST_SENDQUIT
if rCode == ST_OK
cCommand = ""
oSocket:End()
::nStatus = ST_ENDED
::AllOk = .t.
else
::LogError( cData, oSocket )
endif
endcase
msginfo( cCommand )
if ! Empty( cCommand )
oSocket:SendData( cCommand )
if cCommand == "QUIT" + CRLF
if ::bDone != nil
Eval( ::bDone, Self )
endif
endif
endif
return nil
//----------------------------------------------------------------------------//
METHOD LogError( cData, oSocket ) CLASS TPop4
oSocket:End()
LogFile( "MailErr.log", { ::nStatus,cData } )
::AllOk := .f.
return nil
//----------------------------------------------------------------------------//
MSGInfo( "Geting Internet email..." )
oInMail = TPop4():New( cIp,, "danyleon82@gmail.com", "tormenta82" ) // mail server IP
oInMail:bConnecting = { || MSGInfo( "Connecting to " + cIp ) }
oInMail:bConnected = { || MSGInfo( "Connected" ) }
oInMail:bDone = { || ReadEmails( oInMail ) }
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 37 guests