testpop3

testpop3

Postby damianodec » Fri Nov 10, 2017 10:06 am

hi to all
I'm trying testpop3 but it does not work...
Code: Select all  Expand view

function GetMail()

   local oInMail, cIP
   
    cIP := GetHostByName( "pop3.aruba.it")
   
   oWnd:SetMsg( "Geting Internet email..." )
   
   oInMail = TPop3():New( cIP,  110 , "myemail@mydomain.it", "mypsw" )  // mail server IP
   
   oInMail:bConnecting = { || oWnd:SetMsg( "Connecting to xxx.xxx.xxx.xxx" ) }
   
   oInMail:bConnected  = { || oWnd:SetMsg( "Connected" ) }
   
   oInMail:bDone       = { || ReadEmails( oInMail ) }

   oInMail:GetMail()

return nil

//----------------------------------------------------------------------------//

function ReadEmails( oInMail )

   local n

   MsgInfo( "Total emails: " + Str( Len( oInMail:aMsgs ) ) )

   for n = 1 to Len( oInMail:aMsgs )
      MsgInfo( oInMail:aMsgs[ n ] )
   next

return nil

//----------------------------------------------------------------------------//


in MailErr.log I get: 10-11-2017 10:45:01: 3 -ERR [AUTH] Authentication failed.
myemail@mydomain.it and mypsw works when I logged in webmail

any help?
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: testpop3

Postby Enrico Maria Giordano » Fri Nov 10, 2017 11:05 am

I'm using this function:

Code: Select all  Expand view
STATIC FUNCTION GETMAIL( cServer, cUser, cPassword )

    LOCAL lOk := .F.

    LOCAL oCli

    LOCAL aMail, aPar, cMsg, oAtt

    LOCAL i

    TRY
        oCli = TIPClientPOP():New( "pop://" + STRTRAN( cUser, "@", "&at;" ) + ":" + cPassword + "@" + cServer )

        IF EMPTY( oCli ); BREAK; ENDIF

        oCli:oUrl:cUserid = cUser

        IF !oCli:Open(); BREAK; ENDIF

        aMail = oCli:RetrieveAll()

        FOR i = 1 TO LEN( aMail ) - 1
            aPar = aMail[ i ]:GetMultiParts()

            IF LEN( aPar ) = 0
                cMsg = "Data: " + aMail[ i ]:GetFieldPart( "Date" ) + CRLF +;
                       "Oggetto: " + aMail[ i ]:GetFieldPart( "Subject" ) + CRLF +;
                       "Mittente: " + aMail[ i ]:GetFieldPart( "From" ) + CRLF + CRLF +;
                       "Messaggio: " + CRLF + CRLF + aMail[ i ]:GetBody()
            ELSE
                cMsg = "Data: " + aMail[ i ]:GetFieldPart( "Date" ) + CRLF +;
                       "Oggetto: " + aMail[ i ]:GetFieldPart( "Subject" ) + CRLF +;
                       "Mittente: " + aMail[ i ]:GetFieldPart( "From" ) + CRLF + CRLF +;
                       "Messaggio: " + CRLF + CRLF + BODY( aPar )
            ENDIF

            WHILE ( oAtt := aMail[ i ]:NextAttachment() ) != NIL
                IF !EMPTY( oAtt:GetFileName() )
                    cMsg += CRLF + "Allegato: " + oAtt:GetFileName()
//                    IF !oAtt:DetachFile(); BREAK; ENDIF
                ENDIF
            ENDDO

            ? cMsg
        NEXT

        lOk = .T.
    CATCH
    END

    IF !EMPTY( oCli ); oCli:Close(); ENDIF

    RETURN lOk


STATIC FUNCTION BODY( aPar )

    LOCAL cMsg := ""

    LOCAL i

    FOR i = 1 TO LEN( aPar )
        IF EMPTY( aPar[ i ]:GetFieldPart( "Content-Disposition" ) )
            cMsg += aPar[ i ]:GetBody()
        ENDIF
    NEXT

    RETURN ALLTRIM( cMsg )


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: testpop3

Postby damianodec » Fri Nov 10, 2017 12:34 pm

thank you Enrico

I trying TIPClientPOP() with this code:
Code: Select all  Expand view

STATIC FUNCTION GETMAIL( "pop3.mydomain.it", "user@mydomainit", "myPassword" )

    LOCAL lOk := .F.

    LOCAL oCli

    LOCAL aMail, aPar, cMsg, oAtt

    LOCAL i
   
        oCli = TIPClientPOP():New( "pop://" + STRTRAN( cUser, "@", "&at;" ) + ":" + cPassword + "@" + cServer )
        msginfo("STEP1")
        IF EMPTY( oCli ); BREAK; ENDIF
        msginfo("STEP2")
        oCli:oUrl:cUserid = STRTRAN( cUser, "@", "&at;" )

        IF !oCli:Open(); BREAK; ENDIF
       
        msginfo("STEP3")
       
        aMail = oCli:RetrieveAll()


but never show MSGINFO("STEP3")

why?

thank you
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: testpop3

Postby Enrico Maria Giordano » Fri Nov 10, 2017 12:42 pm

Can you send me the exact sample are you trying to get to work so I can test it here?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: testpop3

Postby damianodec » Fri Nov 10, 2017 1:13 pm

I call GetMailZ from my menu GetMail(oWnd)

here you are:
[code=fw]
// Testing FiveWin new Internet incoming mail (POP3 protocol) Class

#include "FiveWin.ch"

STATIC FUNCTION GETMAIL( "pop3.dominio.it", "info@dominio.it", "password" )

    LOCAL lOk := .F.

    LOCAL oCli

    LOCAL aMail, aPar, cMsg, oAtt

    LOCAL i
   
   
    TRY
        oCli = TIPClientPOP():New( "pop://" + STRTRAN( cUser, "@", "&at;" ) + ":" + cPassword + "@" + cServer )
        msginfo("STE1")
        IF EMPTY( oCli ); BREAK; ENDIF
        msginfo("STEP2")
        oCli:oUrl:cUserid = STRTRAN( cUser, "@", "&at;" )

        IF !oCli:Open(); BREAK; ENDIF
       
        msginfo("STEP3")
       
        aMail = oCli:RetrieveAll()

        FOR i = 1 TO LEN( aMail ) - 1
            aPar = aMail[ i ]:GetMultiParts()

            IF LEN( aPar ) = 0
                cMsg = "Data: " + aMail[ i ]:GetFieldPart( "Date" ) + CRLF +;
                       "Oggetto: " + aMail[ i ]:GetFieldPart( "Subject" ) + CRLF +;
                       "Mittente: " + aMail[ i ]:GetFieldPart( "From" ) + CRLF + CRLF +;
                       "Messaggio: " + CRLF + CRLF + aMail[ i ]:GetBody()
            ELSE
                cMsg = "Data: " + aMail[ i ]:GetFieldPart( "Date" ) + CRLF +;
                       "Oggetto: " + aMail[ i ]:GetFieldPart( "Subject" ) + CRLF +;
                       "Mittente: " + aMail[ i ]:GetFieldPart( "From" ) + CRLF + CRLF +;
                       "Messaggio: " + CRLF + CRLF + BODY( aPar )
            ENDIF

            WHILE ( oAtt := aMail[ i ]:NextAttachment() ) != NIL
                IF !EMPTY( oAtt:GetFileName() )
                    cMsg += CRLF + "Allegato: " + oAtt:GetFileName()
//                    IF !oAtt:DetachFile(); BREAK; ENDIF
                ENDIF
            ENDDO

            msginfo(cMsg)
        NEXT

        lOk = .T.
    CATCH
    END

    IF !EMPTY( oCli ); oCli:Close(); ENDIF

    RETURN lOk


STATIC FUNCTION BODY( aPar )

    LOCAL cMsg := ""

    LOCAL i

    FOR i = 1 TO LEN( aPar )
        IF EMPTY( aPar[ i ]:GetFieldPart( "Content-Disposition" ) )
            cMsg += aPar[ i ]:GetBody()
        ENDIF
    NEXT

    RETURN ALLTRIM( cMsg )
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: testpop3

Postby Enrico Maria Giordano » Fri Nov 10, 2017 2:11 pm

Sorry, I can't help you without a full working sample of the problem. All I can say is that it is working fine if the correct parameters are provided.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: testpop3

Postby damianodec » Mon Nov 13, 2017 8:31 am

hi Enrico, I put this TESTPOPX.PRG in FHW/SAMPLES

Code: Select all  Expand view
// 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("pop3.example.it", "info@example.it", "password") TOOLTIP "Get Mail x"

   SET MESSAGE OF oWnd TO "Ready" NOINSET DATE TIME KEYBOARD

   ACTIVATE WINDOW oWnd

return nil

//----------------------------------------------------------------------------//

STATIC FUNCTION GETMAIL( cServer, cUser, cPassword )

    LOCAL lOk := .F.

    LOCAL oCli

    LOCAL aMail, aPar, cMsg, oAtt

    LOCAL i
   
   TRY
        oCli = TIPClientPOP():New( "pop://" + STRTRAN( cUser, "@", "&at;" ) + ":" + cPassword + "@" + cServer )
       
        IF EMPTY( oCli ); BREAK; ENDIF
       
        oCli:oUrl:cUserid = STRTRAN( cUser, "@", "&at;" )

        IF !oCli:Open(); BREAK; ENDIF
       
        aMail = oCli:RetrieveAll()
    CATCH
        msginfo("ERRORE")
    END
   
Return NIL
 


to compile it I use this:
Code: Select all  Expand view
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST

ECHO Compiling...

if "%FWDIR%" == "" set FWDIR=.\..\
if "%XHDIR%" == "" set XHDIR=c:\xharbour
rem if "%2" == "/b" set GT=gtwin
rem if not "%2" == "/b" set GT=gtgui
set GT=gtgui

set hdir=%XHDIR%
set hdirl=%hdir%\lib
set bcdir=c:\borland\bcc55
set fwh=%FWDIR%

%hdir%\bin\harbour %1 /n /i%fwh%\include;%hdir%\include /w /p %2 %3 > comp.log
IF ERRORLEVEL 1 GOTO COMPILEERRORS
@type comp.log

echo -O2 -e%1.exe -I%hdir%\include -I%bcdir%\include %1.c > b32.bc
%bcdir%\bin\bcc32 -M -c -v @b32.bc
:ENDCOMPILE

IF EXIST %1.rc %bcdir%\bin\brc32 -r -I%bcdir%\include %1

echo /aa + > b32.bc
echo /Gn + >> b32.bc
echo /Tpe + >> b32.bc
echo /s + >> b32.bc
echo /v + >> b32.bc
echo /Lc:\fwh\lib;c:\xharbour\lib;c:\borland\bcc55\lib;c:\borland\bcc55\lib\psdk;C:\fwh\INCLUDE;c:\xharbour\INCLUDE;c:\borland\bcc55\INCLUDE + >> b32.bc
echo c0w32.obj + >> b32.bc
echo %bcdir%\lib\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 %hdirl%\rtl.lib + >> b32.bc
echo %hdirl%\vm.lib + >> b32.bc
echo %hdirl%\%GT%.lib + >> b32.bc
echo %hdirl%\lang.lib + >> b32.bc
echo %hdirl%\macro.lib + >> b32.bc
echo %hdirl%\rdd.lib + >> b32.bc
echo %hdirl%\dbfntx.lib + >> b32.bc
echo %hdirl%\dbfcdx.lib + >> b32.bc
echo %hdirl%\dbffpt.lib + >> b32.bc
echo %hdirl%\hbsix.lib + >> b32.bc
echo %hdirl%\debug.lib + >> b32.bc
echo %hdirl%\common.lib + >> b32.bc
echo %hdirl%\pp.lib + >> b32.bc
echo %hdirl%\pcrepos.lib + >> b32.bc
echo %hdirl%\ct.lib + >> b32.bc
echo %hdirl%\zlib.lib + >> b32.bc
echo %hdirl%\hbzip.lib + >> b32.bc
echo %hdirl%\adordd.lib + >> b32.bc
echo %hdirl%\png.lib + >> b32.bc
echo %hdirl%\tip.lib + >> 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\psapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\iphlpapi.lib, >> b32.bc

rem echo %bcdir%\lib\psdk\gdiplus.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
if %GT% == gtwin %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
if %GT% == gtgui %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

:COMPILEERRORS
@type comp.log
ECHO * Compile errors *
GOTO EXIT

:LINKERROR
ECHO * Linking errors *
GOTO EXIT

:SINTAX
ECHO    SYNTAX: Build [Program]     {-- No especifiques la extensi? PRG
ECHO                                {-- Don't specify .PRG extension
GOTO EXIT

:NOEXIST
ECHO The specified PRG %1 does not exist

:EXIT

I added TIP.LIb to compile because without it I get:
Error: Unresolved external '_HB_FUN_TIPCLIENTPOP' referenced from C:\FWH\SAMPLES\TESTPOPX.OBJ

then I run it but I get "ERRORE" from msginfo

thank you for your help...
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: testpop3

Postby Enrico Maria Giordano » Mon Nov 13, 2017 9:34 am

Remove TRY/CATCH/END so you can see the real error.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: testpop3

Postby damianodec » Mon Nov 13, 2017 11:50 am

hi Enrico,
I removed TRY/CACTH
now I run .exe, click button for ACTION Getmail and nothing happens

any suggestion?
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: testpop3

Postby Enrico Maria Giordano » Mon Nov 13, 2017 12:06 pm

In order to help you I need a complete sample to run here.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: testpop3

Postby damianodec » Mon Nov 13, 2017 2:11 pm

Hi Enrico or any other
my code is just this (MYPOP3.PRG):
Code: Select all  Expand view
// 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("pop3.mydomain.it", "info@mydomain.it", "password") TOOLTIP "Get Mail x"

   SET MESSAGE OF oWnd TO "Ready" NOINSET DATE TIME KEYBOARD

   ACTIVATE WINDOW oWnd

return nil

//----------------------------------------------------------------------------//

STATIC FUNCTION GETMAIL( cServer, cUser, cPassword )

    LOCAL lOk := .F.

    LOCAL oCli

    LOCAL aMail, aPar, cMsg, oAtt

    LOCAL i

    cUser := StrTran( cUser, "@", "&at;" )
        oCli = TIPClientPOP():New( "pop://" + cUser + ":" + cPassword + "@" + cServer )
         
        IF EMPTY( oCli ); BREAK; ENDIF
         
        oCli:oUrl:cUserid = Strtran( cUser, "&at;", "@" )

        IF !oCli:Open(); BREAK; ENDIF
         
        aMail = oCli:RetrieveAll()

        FOR i = 1 TO LEN( aMail ) - 1
            aPar = aMail[ i ]:GetMultiParts()

            IF LEN( aPar ) = 0
                cMsg = "Data: " + aMail[ i ]:GetFieldPart( "Date" ) + CRLF +;
                       "Oggetto: " + aMail[ i ]:GetFieldPart( "Subject" ) + CRLF +;
                       "Mittente: " + aMail[ i ]:GetFieldPart( "From" ) + CRLF + CRLF +;
                       "Messaggio: " + CRLF + CRLF + aMail[ i ]:GetBody()
            ELSE
                cMsg = "Data: " + aMail[ i ]:GetFieldPart( "Date" ) + CRLF +;
                       "Oggetto: " + aMail[ i ]:GetFieldPart( "Subject" ) + CRLF +;
                       "Mittente: " + aMail[ i ]:GetFieldPart( "From" ) + CRLF + CRLF +;
                       "Messaggio: " + CRLF + CRLF + BODY( aPar )
            ENDIF

            WHILE ( oAtt := aMail[ i ]:NextAttachment() ) != NIL
                IF !EMPTY( oAtt:GetFileName() )
                    cMsg += CRLF + "Allegato: " + oAtt:GetFileName()
//                    IF !oAtt:DetachFile(); BREAK; ENDIF
                ENDIF
            ENDDO

            ? cMsg
        NEXT

        lOk = .T.

    IF !EMPTY( oCli ); oCli:Close(); ENDIF

    RETURN lOk


STATIC FUNCTION BODY( aPar )

    LOCAL cMsg := ""

    LOCAL i

    FOR i = 1 TO LEN( aPar )
        IF EMPTY( aPar[ i ]:GetFieldPart( "Content-Disposition" ) )
            cMsg += aPar[ i ]:GetBody()
        ENDIF
    NEXT

    RETURN ALLTRIM( cMsg )


and I compile it with this BUILDX MYPOP3 (in C:\FWH\SAMPLES)
Code: Select all  Expand view

@ECHO OFF
CLS
ECHO 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴커
ECHO ?FiveWin for xHarbour 12.01 - Jan. 2012          xHarbour development power
ECHO ?(c) FiveTech, 1993-2012     for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7
ECHO 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴켸?
ECHO  賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽?

if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST

ECHO Compiling...

if "%FWDIR%" == "" set FWDIR=.\..\
if "%XHDIR%" == "" set XHDIR=c:\xharbour
rem if "%2" == "/b" set GT=gtwin
rem if not "%2" == "/b" set GT=gtgui
set GT=gtgui

set hdir=%XHDIR%
set hdirl=%hdir%\lib
set bcdir=c:\borland\bcc55
set fwh=%FWDIR%

%hdir%\bin\harbour %1 /n /i%fwh%\include;%hdir%\include /w /p %2 %3 > comp.log
IF ERRORLEVEL 1 GOTO COMPILEERRORS
@type comp.log

echo -O2 -e%1.exe -I%hdir%\include -I%bcdir%\include %1.c > b32.bc
%bcdir%\bin\bcc32 -M -c -v @b32.bc
:ENDCOMPILE

IF EXIST %1.rc %bcdir%\bin\brc32 -r -I%bcdir%\include %1

echo /aa + > b32.bc
echo /Gn + >> b32.bc
echo /Tpe + >> b32.bc
echo /s + >> b32.bc
echo /v + >> b32.bc
echo /Lc:\fwh\lib;c:\xharbour\lib;c:\borland\bcc55\lib;c:\borland\bcc55\lib\psdk;C:\fwh\INCLUDE;c:\xharbour\INCLUDE;c:\borland\bcc55\INCLUDE + >> b32.bc
echo c0w32.obj + >> b32.bc
echo %bcdir%\lib\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 %hdirl%\rtl.lib + >> b32.bc
echo %hdirl%\vm.lib + >> b32.bc
echo %hdirl%\%GT%.lib + >> b32.bc
echo %hdirl%\lang.lib + >> b32.bc
echo %hdirl%\macro.lib + >> b32.bc
echo %hdirl%\rdd.lib + >> b32.bc
echo %hdirl%\dbfntx.lib + >> b32.bc
echo %hdirl%\dbfcdx.lib + >> b32.bc
echo %hdirl%\dbffpt.lib + >> b32.bc
echo %hdirl%\hbsix.lib + >> b32.bc
echo %hdirl%\debug.lib + >> b32.bc
echo %hdirl%\common.lib + >> b32.bc
echo %hdirl%\pp.lib + >> b32.bc
echo %hdirl%\pcrepos.lib + >> b32.bc
echo %hdirl%\ct.lib + >> b32.bc
echo %hdirl%\zlib.lib + >> b32.bc
echo %hdirl%\hbzip.lib + >> b32.bc
echo %hdirl%\adordd.lib + >> b32.bc
echo %hdirl%\png.lib + >> b32.bc
echo %hdirl%\tip.lib + >> 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\psapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\iphlpapi.lib, >> b32.bc

rem echo %bcdir%\lib\psdk\gdiplus.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
if %GT% == gtwin %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
if %GT% == gtgui %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

:COMPILEERRORS
@type comp.log
ECHO * Compile errors *
GOTO EXIT

:LINKERROR
ECHO * Linking errors *
GOTO EXIT

:SINTAX
ECHO    SYNTAX: Build [Program]     {-- No especifiques la extensi? PRG
ECHO                                {-- Don't specify .PRG extension
GOTO EXIT

:NOEXIST
ECHO The specified PRG %1 does not exist

:EXIT


I use xHarbour (or is better HARBOUR?)

when I run mypop3.EXE i get:
Code: Select all  Expand view
Application
===========
   Path and name: C:\fwh\samples\my.exe (32 bits)
   Size: 1,829,376 bytes
   Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 9421)
   FiveWin  Version: FWHX 11.12
   Windows version: 6.2, Build 9200

   Time from start: 0 hours 0 mins 8 secs
   Error occurred at: 11/13/17, 15:01:21
   Error description: Error BASE/1108  Argument error: AT
   Args:
     [   1] = C  

     [   2] = U  

Stack Calls
===========
   Called from:  => AT( 0 )
   Called from: source\tip\mail.prg => TIPMAIL:FROMSTRING( 0 )
   Called from: source\tip\popcln.prg => TIPCLIENTPOP:RETRIEVEALL( 0 )
   Called from: testpopy.prg => GETMAIL( 47 )
   Called from: testpopy.prg => (b)MAIN( 17 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 465 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 656 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1690 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 1407 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3159 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 980 )
   Called from: testpopy.prg => MAIN( 21 )

System
======
   CPU type: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz 2400 Mhz
   Hardware memory: 4280 megs

   Free System resources: 90 %
        GDI    resources: 90 %
        User   resources: 90 %

   Windows total applications running: 28
      1 , C:\Program Files (x86)\ASUS\ASUS Smart Gesture\AsTPCenter\x64\AsusTPCenter.exe
      2 , C:\Program Files (x86)\ASUS\Giftbox\Asusgiftbox.exe
      3 , C:\Program Files (x86)\Avira\Antivirus\avgnt.exe
      4 , C:\Program Files (x86)\Avira\Launcher\Avira.Systray.exe
      5 , C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
      6 , C:\Program Files (x86)\IBM\Client Access\Emulator\pcsws.exe
      7 , C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe
      8 , C:\Program Files (x86)\Notepad++\notepad++.exe
      9 , C:\Program Files\Lenovo\Lenovo Slim USB Keyboard\Skd8821.exe
     10 , C:\Windows\System32\RuntimeBroker.exe
     11 , C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\SearchUI.exe
     12 , C:\Windows\explorer.exe
     13 ACMON, C:\Program Files (x86)\ASUS\Splendid\ACMON.exe
     14 ASUSSPOTLIGHT,
     15 BroadcastListenerWindow, C:\Program Files (x86)\NVIDIA Corporation\Update Core\NvBackend.exe
     16 DDE Server Window, C:\Users\Damiano\AppData\Local\Microsoft\OneDrive\OneDrive.exe
     17 GDI+ Window, C:\Program Files (x86)\ASUS\ASUS Smart Gesture\AsTPCenter\x64\AsusTPLoader.exe
     18 MSCTFIME UI, C:\Windows\System32\conhost.exe
     19 NotifyIconWindowTitle, C:\Program Files\TightVNC\tvnserver.exe
     20 PCSCM, C:\Program Files (x86)\IBM\Client Access\Emulator\pcscm.exe
     21 Pelles C Command Prompt - buildx  testpopy, C:\Windows\System32\cmd.exe
     22 Realtek HD Audio Background Process for Vista, C:\Program Files\Realtek\Audio\HDA\RAVBg64.exe
     23 Realtek HD Audio CPL for Vista, C:\Program Files\Realtek\Audio\HDA\RAVCpl64.exe
     24 Receiving Internet Mail from FiveWin, C:\fwh\samples\testpopy.exe
     25 Task Host Window, C:\Windows\System32\taskhostw.exe
     26 The Event Manager Dashboard, C:\Windows\System32\DriverStore\FileRepository\igdlh64.inf_amd64_463164d40c3d26ce\igfxEM.exe
     27 VCL ImplGetDefaultWindow, C:\Program Files (x86)\OpenOffice 4\program\soffice.bin
     28 error - Blocco note, C:\Windows\SysWOW64\notepad.exe

Variables in use
================
   Procedure     Type   Value
   ==========================
   AT
     Param   1:    C    "
"

     Param   2:    U    
     Param   3:    N    1
     Local   1:    U    
     Local   2:    U    
   TIPMAIL:FROMSTRING
     Param   1:    U    
     Local   1:    U    
     Local   2:    N    1
     Local   3:    O    Class: TIPMAIL
     Local   4:    U    
     Local   5:    U    
     Local   6:    U    
     Local   7:    U    
     Local   8:    U    
     Local   9:    U    
     Local  10:    U    
   TIPCLIENTPOP:RETRIEVEALL
     Local   1:    L    .F.
     Local   2:    O    Class: TIPCLIENTPOP
     Local   3:    A    Len:    3
     Local   4:    N    3
     Local   5:    N    3
     Local   6:    U    
   GETMAIL
     Param   1:    C    "pop3.mydomani.it"  <---(this is example)
     Param   2:    C    "info&at;mydomain.it"   <---(this is example)
     Param   3:    C    "password"   <---(this is example)
     Local   1:    L    .F.
     Local   2:    O    Class: TIPCLIENTPOP
     Local   3:    U    
     Local   4:    U    
     Local   5:    U    
     Local   6:    U    
     Local   7:    U    
   (b)MAIN
     Param   1:    O    Class: TBTNBMP
   TBTNBMP:CLICK
     Local   1:    O    Class: TBTNBMP
   TBTNBMP:LBUTTONUP
     Param   1:    N    11
     Param   2:    N    8
     Param   3:    O    Class: TBTNBMP
     Local   1:    U    
     Local   2:    L    .T.
   TCONTROL:HANDLEEVENT
     Param   1:    N    514
     Param   2:    N    0
     Param   3:    N    720904
     Local   1:    O    Class: TBTNBMP
     Local   2:    U    
   TBTNBMP:HANDLEEVENT
     Param   1:    N    514
     Param   2:    N    0
     Param   3:    N    720904
     Local   1:    O    Class: TBTNBMP
   _FWH
     Param   1:    N    720904
     Param   2:    N    514
     Param   3:    N    0
     Param   4:    N    720904
     Param   5:    N    3
     Local   1:    O    Class: TBTNBMP
   WINRUN
     Param   1:    N    5966142
   TWINDOW:ACTIVATE
     Param   1:    C    "NORMAL"
     Param   2:    U    
     Param   3:    U    
     Param   4:    U    
     Param   5:    U    
     Param   6:    U    
     Param   7:    U    
     Param   8:    U    
     Param   9:    U    
     Param  10:    U    
     Param  11:    U    
     Param  12:    U    
     Param  13:    U    
     Param  14:    U    
     Param  15:    U    
     Param  16:    U    
     Param  17:    U    
     Param  18:    U    
     Param  19:    U    
     Local   1:    O    Class: TWINDOW
     Local   2:    U    
     Local   3:    U    
   MAIN
     Local   1:    O    Class: TBAR

Linked RDDs
===========
   DBF
   DBFFPT
   DBFBLOB
   DBFNTX

DataBases in use
================

Classes in use:
===============
     1 ERROR
     2 HASHENTRY
     3 HBCLASS
     4 HBOBJECT
     5 TWINDOW
     6 TBRUSH
     7 TFONT
     8 TCONTROL
     9 TBAR
    10 TRECT
    11 TBTNBMP
    12 TMSGBAR
    13 TMSGITEM
    14 TTIMER
    15 TIPCLIENT
    16 TIPCLIENTPOP
    17 TURL
    18 TIPMAIL
    19 TIPENCODER
    20 TIPENCODERQP
    21 TREG32

Memory Analysis
===============
      150 Static variables

   Dynamic memory consume:
      Actual  Value:          0 bytes
      Highest Value:          0 bytes
 


thank you
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: testpop3

Postby Enrico Maria Giordano » Mon Nov 13, 2017 2:17 pm

I know that sample is working fine with my pop3 server. For this I need to test it with your.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: testpop3

Postby damianodec » Mon Nov 13, 2017 2:34 pm

hi Enrico
I sent to you email with access data

thank you
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: testpop3

Postby Enrico Maria Giordano » Mon Nov 13, 2017 2:42 pm

The server name was mistyped (pop instead of pop3).

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: testpop3

Postby Rick Lipkin » Mon Nov 13, 2017 2:49 pm

damianodec

FYI .. If you are trying to use Gmail via POP or IMAP from multiple devices .. you will need to tell Gmail to let less secure apps use your account .. in order to connect.... if you are using your own domain .. obviously this suggestion will not apply..

Rick Lipkin

https://support.google.com/accounts/ans ... 0255?hl=en
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 39 guests