Simple script to poll mails from POP3 mailbox
and submit them to local pickup
'This is a sample script for Aloahas scripted POP3 Connector 'The scripted POP3 Connector is part of Aloaha SPAM Rejector 'Should you require the standalone dll please contact 'mailto:stefan@wrocklage.de Dim pop Dim amount Dim cdo Dim cdoSendUsingPickup Dim cdoSendUsingMethod Dim iconf Dim i
cdoSendUsingPickup = 1 cdoSendUsingMethod = "http://schemas.microsoft.com/cdo/configuration/sendusing"
'Create Aloaha POP3 Connector Object Set pop = CreateObject("pop3news.popnews")
'set server, username and password 'if pop port is a non default port such as gmail please use the .port property pop.remotehost = "mail.aloaha.com" pop.username = "web31p8" pop.password = "testing" 'connect If pop.autoconnect = True Then 'enumerate emails in pop3 mailbox amount = CInt(pop.getammount) If amount>0 Then 'download and submit them to pickup via CDO For i = 1 to amount err.clear set cdo = pop.get_cdo(CStr(i)) Set iconf = cdo.Configuration iconf.Fields.Item(cdoSendUsingMethod) = cdoSendUsingPickup iconf.Fields.Update cdo.send Set iconf = nothing Set cdo = nothing If err.number=0 Then Call pop.deletemail(cstr(i)) End If Next End If Call pop.close_and_quit End If
Set iconf = nothing Set cdo = nothing Set pop = nothing