Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET POP3

 AfterLogic Forum : MailBee.NET POP3
Subject Topic: Download all Messages. Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Jaggernaut
Newbie
Newbie
Avatar

Joined: 16 August 2006
Location: Sweden
Online Status: Offline
Posts: 2
Posted: 16 August 2006 at 5:45am | IP Logged Quote Jaggernaut

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 View Jaggernaut's Profile Search for other posts by Jaggernaut
 
Jaggernaut
Newbie
Newbie
Avatar

Joined: 16 August 2006
Location: Sweden
Online Status: Offline
Posts: 2
Posted: 16 August 2006 at 5:50am | IP Logged Quote Jaggernaut

Well.. Forget it.. I solved the issue. I was just too tired to get a clear view over it.
Back to Top View Jaggernaut's Profile Search for other posts by Jaggernaut
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide