473,791 Members | 3,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parsing an email to find a mailing address?

I have a very interesting request. A customer receives orders via email.
The email contains the shipping address, shipping method, email address
and phone number. This information is not all together, nor is it in the
same format in each email as the emails come from different order
houses.

The customer wants me to scan the email and pull the information out so
that it can be used to import into their shipping software.

I've been able to copy the body of the email to the windows clipboard
and then into a string variable in VB. But now the hard part, finding
the shipping address.

Has anyone done something like this? How do I recognize a shipping
address in a page full of text?

Some of the different variations on the address are:

Name: Name
Address: 123 Nowhere St
City/State/Zip: Glendale, CA 90000

or

Name
123 Nowhere St
Glendale, CA 90000

or

Name
123 Nowhere St
Glendale, California
90000 USA

or

Name: Name
Address: 123 Nowhere St
City: Glendale
State: ca
Country: usa
Zip: 90000


*** Sent via Developersdex http://www.developersdex.com ***
Feb 19 '07 #1
2 1606
Terry Olsen <to******@hotma il.comwrote in news:uQQgrdHVHH A.3592
@TK2MSFTNGP06.p hx.gbl:
Has anyone done something like this? How do I recognize a shipping
address in a page full of text?
Is the e-mail address passed through the e-mail header? Can you extract it
there?

If not, you can use regular expressions to parse the email address.
Feb 20 '07 #2
Hi Terry

What you're basically trying to do is Information Extraction from free
text which is a common challenge/problem in the Natural Language
Processing/Machine Learning arena and is something that can be
incredibly complex due to the fact that it's a person adding these
addresses in the first place and therefore they could be added in
many, many different ways. If you're willing to go down that route
then I'd suggest doing a search on "Named Entity Recognition" and/or
Information Extraction / Natural Language Processing etc.

However, in your instance you state that the emails come from a number
of different order houses - if that's the case then it'd be a whole
lot easier if you could either agree a standard format for these
emails to use, or failing that, if the emails from each order house is
in the same format (but a different format to emails from other order
houses) then it'd be a whole lot simpler to get a sample of an email
from each different sender and work on parsing them one at a time with
regex or your particular weapon of choice.

Hope that helps
Martin

Feb 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1719
by: cfoley1970 | last post by:
I have an online directory of alumni from a high school that runs PHP with a MySql backend containing contact info, email addresses, etc. Some of the alumni have begun to complain about receiving spam to their accounts, some of the spam saying that they "know" them from this site. I've also had alumni that have created email accounts to specifically use just for this site, and they've started getting spam as well. I "thought" I thought of...
4
3020
by: dmiller23462 | last post by:
So here's my problem.....I need to set up different email distributions based on which option in the following Select form has been chosen....For instance if "Putaway" is chosen it needs to email User1@here.whatever and User4@here.whatever but if "Loaded" is chosen it needs to email User2@here.whatever and User3@here.whatever, etc, etc... I'm aware that the only thing that really needs to change is the "Mail.AddAddress" line (at least...
2
3818
by: Nigi | last post by:
I've made a mysql database with php front end which, in part, contains mailing lists. I've used a mailto: link to create a new email with their names in the bcc: field. Unfortunatley their is a limit on the size of a mailto: field that outlook can accept, and so it can't be used to mail more than about 80 people at a time. Our lists go up to 200. Can anyone suggest a workaround that will enable people to follow a link to a new email...
117
11897
by: Steevo | last post by:
Any suggestions as to the best programs for cloaking email addresses? Many thanks -- Steevo
0
1433
by: Li-fan Chen | last post by:
Hi, We work with email in a large CRM solution and one of the email-related tasks that has plagued us is our decision to make use of a 3rd-party local-sourcer to work on the parsing of inbound email. It would appear to be a simple exercise (writing a parser against a select few RFCs), but having someone write this component NIH (doing it by hand, instead of using a 3rd party component) has caused endless problems. We are hoping to right...
4
2088
by: kang jia | last post by:
hi i am doing mailinglist currently. the code in my first page is like this : : <html> <head> <link rel="stylesheet" type="text/css" href="gallery.css" /> <script language="JavaScript"> <!--
4
2012
by: chris | last post by:
I need to maintain a list of subscribers to an email list for a "newsletter" that will be sent via a web form probably once a month. I anticipate low numbers--tens to maybe one hundred subscribers at the most. Just curious what the best way to code this is. Should I just loop through the addresses and send one-off emails to each, or is it better to somehow send to every recipient in one shot? One thing I would like to avoid in the...
11
1600
by: Bob Bedford | last post by:
Hi all, we have many people that have registered to our newsletter and we are getting every time more people who the email is unavailable. It's there any technique to detect such unavailable address ? We tought about using a special email (like newsletter@ourdomain.com) then using a PHP script to catch the returning email and catch some text on them and decide if we remove the address from our mailing list or not. It's possible with...
3
2024
by: razjafry | last post by:
Hi Experts, I have two tables - tblContact and tblOrg Contact table has only one option of mailing address e.g address,city,postal code whereas Org table has two options - one simple address - address,city, postal code and other one is mailing address which is populated automatically if a check box is checked "Is mailing address same" - mailing address, mailing city, mailing Postal code I want to generate a mailing list that gets all the...
0
10427
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9995
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9029
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5431
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.