Check out the sample code below to
see just how easy it is to use the POP3 component
of
EasyMail Objects. But don't let the ease of use
fool you; the POP3 component
is very powerful and
packed with features. The sample code on this page demonstrates the most basic features of
the POP3 component. Be sure to click on the "Other Samples" tab to find
more advanced samples.
| Sample Notes | | This sample demonstrates the basic functionality of the POP3 component that connects to a mail box and displays how many messages are available. |
Set POP3 = CreateObject("EasyMail.POP3") POP3.MailServer = "mail.yourdomain.com" POP3.Account="jdoe" POP3.Password="secret" pop3.Connect x = POP3.DownloadMessages(0) if x = 0 then msgbox "You have" & POP3.Messages.Count & "messages waiting." else msgbox "There was an error retrieving your mail. Error code: " & x end if POP3.Disconnect
|