Console app - unable to instance pop3s session

I’m trying to set up a basic application that reacts to a special email(in a dedicated mailbox since xojo doesn’t support imap natively) but i"m having issues instancing the pop3s connection. I’ve added a POP3s socket (called MailSocket) and created a timer that runs this bit of code [code] Dim MailSocket as POP3SecureSocket
Dim Mails as integer

//instance POP3S socket
MailSocket.Address = MailSvr
MailSocket.Port = MailPort
MailSocket.username = EMailpass
MailSocket.password = EMailusr

If Mails =! 0 then WOLrun = true
End IF

if WOLrun = True then IPAddress, MAC)
WOLRun = False
End IF[/code] but I’m getting all sorts of item not existing error related to the MailSocket object

Added how? Is it a property on the same object that contains the Timer so that the Timer can see it?

Pop3socket works asynchronously, so the reason you’re having trouble is that when you call Connect, it’s not ready for you to call CountMessages yet. You should call that method in response to the ConnectionEstablished Event being fired. Some goes for CountMessages, when the server responds, it will fire a MessageCount event.

@Paul Lefebvre Via IDE object library on the console app root(delivering me a smogarboard of errors), now that i"ve added it via code i only get a couple of errors on the IDE(exactly what @Greg O’Lone commented about).

The lack of a native IMAP and ping facilities are hindering me too much so I’ll have to revert to another language. Shame :frowning:

Thank you anyway