devicode Site Admin
Joined: 05 Mar 2005 Posts: 249
|
Posted: Sun May 29, 2005 4:38 pm Post subject: How do I extract specific information from my email. |
|
|
Question
I have setup a responder to autoreply to my purchase email. So when someone buys a product from my web site it will sent them a noticification email that I will be shipping the product within 2 days.
This work just fine. However, I would like to extract some information from the email and put it into an Excel spreadsheet.
Here is sample of the email that I get
Order ID : AD-34321
Order Date : 03-19-2005
Product Name : iPod
Quantity : 1
Price : $299.99
Card Holder : Paul Brown
Email : paulbrown@aol.com
Address : 12 Bluemoon Ave
City : Boca
State : NJ
Zip : 53127
..
..
How do I pull the persons name and address from the message?
Answer
Response Mailer can extract that information from your incoming email message. What you need to do is add some Extractors to your Responder. You would need an extractor for each item you want to pull from the email.
To extract data from your email you need to identify a way to locate the start and end of the text that you need. For example if you need to get the order date you would tell the program to grab the text that comes between "Order Date :" and the end of the line.
To Extract the purchaser's Name
- Select the Responder.
- Select "New/Add Extractor/Line Parser" from the menu.
- In the "Name" box enter 'Purchaser'.
- In the "Source" box select 'Body'.
- In the "Starts after" box select 'Defined text at beginning of line'.
- In the next box enter "Card Holder*:"
The * represent wildcard letters and will match the letters between the 'r' and the ':'
- In the "Comparison" box select 'Wildcards'.
- In the "Ends after" box select 'End of line'.
- Check the "Remove spaces" box if want the program to remove any spaces that may occur before and after the extracted data.
- Click the OK button to close this window.
- Repeat the above steps for any other items you need to be extracted.
You can now use any extracted item in your autoreply messages or write them to a file. If you include any of these fields in your messages, Response Mailer will substitue the field with the extracted information.
You can write the extracted item to a text file that can be imported into Microsoft Excel.
To write the fields to a file
- Select the Responder.
- Select "New/Action/File Write" from the menu.
- Enter the name of the file to store the information.
- Select "Add to existing file" if you want to add new data at the end of the select file.
Select "Create a new file" if you want to delete your old file before writting the data to the select file.
- In the "Specify file layout" box enter the fields and text that you need. You can use the "Add Field" button to include Extractor fields.
You can either separate the fieds with commas or <%_TAB%>
- Click the OK button to close this window.
. |
|