Author |
|
Jaggernaut Newbie
Joined: 16 August 2006 Location: Sweden
Online Status: Offline Posts: 2
|
Posted: 16 August 2006 at 5:45am | IP Logged
|
|
|
Hi there. I've recently purchased MailBee.NET POP3 and try to implement it in an application I've written in VB.NET (VS2005).
I use the following:
Code:
Dim pop As New Pop3
Dim nMsg As String
Dim nVal As Integer
pop.RaiseEventsViaMessageLoop = False
pop.Connect("mail.myPOP3account.net")
pop.Login("mymailaddress@mymailserver.net", "mypass")
Dim msgs As MailMessageCollection = pop.DownloadMessageHeaders()
nMsg = ""
' Initiate an asynchronous download attempt.
' bodyLineCount = -1 to indicate the entire message must be downloaded.
pop.BeginDownloadMessage(1, -1, Nothing, Nothing)
' Simulate some lengthy work here...
Dim i As Integer
For i = 1 To 50
' Make a portion of the work.
System.Threading.Thread.Sleep(10)
' Process events which were raised during execution of the work above.
pop.Wait(0)
Next
' End the message download operation and return MailMessage object.
' If the operation is still in progress at the moment when
' this method starts, the method will wait until the operation completion.
Dim msg As MailMessage
msg = pop.EndDownloadMessage()
' Save all attachments into C:\Tempfiler folder.
msg.Attachments.SaveAll("C:\Tempfiler")
|
|
|
This downloads the first message, how do I do to download all messages and save all attachments to the C:\Tempfiler folder, and last but not least, delete all messages from Inbox??
|
Back to Top |
|
|
Jaggernaut Newbie
Joined: 16 August 2006 Location: Sweden
Online Status: Offline Posts: 2
|
Posted: 16 August 2006 at 5:50am | IP Logged
|
|
|
Well.. Forget it.. I solved the issue. I was just too tired to get a clear view over it.
|
Back to Top |
|
|