Hello,
I'm writing some code to extract an email address, so far I was able to separate the body of the email into individual line. But would need some guidance with how to extract the email (if one is found in the string). In some other instances the email will be in the "from" field, but I'm assuming that the code will be re-usable?
The string would look something like this:
And here is the code I have so far:
Thanks
I'm writing some code to extract an email address, so far I was able to separate the body of the email into individual line. But would need some guidance with how to extract the email (if one is found in the string). In some other instances the email will be in the "from" field, but I'm assuming that the code will be re-usable?
The string would look something like this:
HTML:
Your message did not reach some or all of the intended recipients.
Subject: Information Meeting - Networking for Career Opportunity
Sent: 07/03/2011 11:43 AM
The following recipient(s) cannot be reached:
'csdi@chaumontsystems.com' on 07/03/2011 11:46 AM
550 5.3.4 Requested action not taken; To continue sending messages, please sign in to your account.
HTML:
For Each MItem In MySubFolder.Items
'MsgBox Ebody
If Left(MItem.Subject, 13) = "Undeliverable" Then ' If the first 14 characters from the subject are "Undeliverable"
Status = "Undeliverable"
Ebody = Split(MItem.body, vbLf)
X = 0 'each line in the body was split, this x will loop through the Ebody sub-strings
' look for email in each sub-string
'*** This is where I have no ideas ******