|
-
Jun 3rd, 2009, 05:48 PM
#1
Thread Starter
Addicted Member
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.
-
Jun 3rd, 2009, 07:02 PM
#2
Junior Member
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()
-
Jun 4th, 2009, 04:30 AM
#3
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|