Results 1 to 3 of 3

Thread: Process Already Received Emails

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2005
    Posts
    169

    Process Already Received Emails

    Hi,
    I receive status emails from a service automatically. I want to open the mesages and read the text and extract some parts. Currently, I have a rule set up in my local email account to transfer these messages to a specific folder. I want to open each message and read its contents and do a pattern match etc.
    How do I go about looping through each message in this folder?

    Thanks for any pointers you may have.

    Dec.

  2. #2
    Junior Member
    Join Date
    Jun 2009
    Posts
    19

    Re: Process Already Received Emails

    Well, im not entirely sure what you mean but i think i know.. Try this as a starting point.


    Code:
            
    Dim Reader As New StreamReader("C:/email.txt")
            Dim Line As String = Reader.ReadLine()
            Do Until Reader.EndOfStream = True
    
                If Line.Contains("some word") AndAlso Not Me.TextBox1.Text.Contains(Line) Then
                    Me.TextBox1.AppendText(Line + vbNewLine)
                    'TextBox1.AppendText(Line) = TextBox1.Text + Line & Environment.NewLine
                    TextBox1.SelectionLength = TextBox1.Text.Length
                    TextBox1.ScrollToCaret()
                End If
                Line = Reader.ReadLine
            Loop
            Reader.Close()

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2005
    Posts
    169

    Re: Process Already Received Emails

    Hi scrapdizle,
    Thanks for the reply. It's actually the process of opening the mail message is where my problem lies: I can do the processing of the text using Regex without any problem.
    Given a mailbox, username and password, specific folder, how do I open up each mail message in that folder?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width