Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mabry utiliti
Message
From
27/09/2001 17:34:05
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Miscellaneous
Thread ID:
00561688
Message ID:
00561706
Views:
24
This message has been marked as the solution to the initial question of the thread.
>Does any buy has any experience using mabry pop utility
>
>I jus down loaded demo and I’m tiring to use it.
>I’m having trouble to create an object so i can execute the “RetrieveMessages” method
>”
>here is the help file for it.
>
< snip >
>My problem is the second parameter. I don’t know how to create it. Can you shade any light on these?
>

Bernardo,

Here is some sample code. Use at your own risk, and it has no error checking. Also, it deletes the messages from the server when done, so you may want to comment out that section of code (near bottom) if you don't want to do that.
opop = createobject("COM.PopX")
opop.host = "mail.yourmailserver.com"
opop.logonname = "yourloginname"
opop.logonpassword = "yourPassword"
? "Connecting to pop server..."
opop.connect
? opop.statestring
? "Retrieving messages..."
if opop.inbox.count > 0
	opop.retrieveMessages(opop.inbox)  && pass a folder as a parameter
	? opop.lasterror
	? opop.lasterrorstring
	? "Finished retrieving,",opop.statestring
	for each omsg in opop.inbox
		? "----------------------  Next Message  --------------------"
	 	? "   From:",omsg.from.text
	    ? "     CC:",omsg.cc
	 	? "Subject:",omsg.subject
		? "Message Text:"
		? omsg.body
	next omsg
	? "deleting messages now..."
	for each omsg in opop.inbox
		opop.delete(omsg)
	next omsg
endif
opop.disconnect
? opop.statestring
Hope it helps,
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform