Reputation: 9705
I have a system where SMS are sent to an email address which is sent to a script for processing. The query in these emails is very simple (something like a zip code). How do I deal with the multitude of different ways that an email can come in? I had a request from an iPhone, which came in as a mms. The email was a multipart message which contained another multipart message.
When I send from my paltry cell phone, I just get a simple text string.
What's a good way to get the intended query out of these emails, regardless of how it is sent.
Upvotes: 0
Views: 177
Reputation: 10877
There is a finite number of ways the e-mail can be represented, I'd say do some empirical testing (as you have, already) and prepare for everything you find. Figure out a way to classify the current case and select the appropriate strategy for extracting the content you're interested in.
Upvotes: 1