ANPOP Asynchronous Mode??

G

George Lampke

I am using ANPOP Component Build 5.0. Using MS XP OS.

To try out the ANPOP in the Asynchronous mode, I wrote some simplified VBA
code that includes the Class and Normal Modules shown below:

It compiles fine, too! Executing Main() should cause ANPOP to call
POPMAIN_OnConnected() when

It connects to the Server. The "Connect" statement is correct (with my
password inserted). In the

Synchronous mode, which is commented out, all is fine.

What am I forgetting??

Thanks, George

---------------------------------------------------------

' POPClass- A Class Module

Option Explicit

Public WithEvents POPMAIN As ANPOPLib.POPMAIN 'Declaring POPMAIN object

Public POPMSG As ANPOPLib.POPMSG 'Declaring POPMSG object

Dim lRet, Mbox

Public Sub POP_main()

On Error GoTo ErrCreateObject

Set POPMAIN = New ANPOPLib.POPMAIN 'Creating object

POPMAIN.Asynchronous = 1 ' Setting asynchronous operting mode.

Set POPMSG = New ANPOPLib.POPMSG 'Creating object

POPMSG.RegisterKey = "ESM49U77264V6LVS2X3I07E7HD313JCJT115E2IV40223R6A117"

'lRet = POPMAIN.Connect("mail.comcast.net", "glampke", "*********")

'If lRet = 0 Then

' Mbox = POPMAIN.GetTotalOfMails()

' MsgBox "Mbox = " & Mbox

'End If

POPMAIN.Connect "mail.comcast.net", "glampke", "*********"

Exit Sub


ErrCreateObject:

MsgBox "Error with create anpop pop3 component, " & _

"please make sure this component has been properly installed"

End Sub

---------------------------------------------

'POPModule - A standard module

Sub Main()

Dim oPOP As POPClass

Set oPOP = New POPClass

oPOP.POP_main

End Sub

Sub POPMAIN_OnConnected()

MsgBox "Message Totals = "

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top