Can anyone point me to a free tool to parse a email message. I was surprised
at the varieties of ways that messages are composed. I some guidance as to
how to locate the message, specifically what defines the start and end of a
message. I can see all of the tags for From, To, Subjects, For and some
others I'm not interested in.
I'm using alines after I use filetostr and sometimes the result drops the
top part of the file and I get message only, other times I get the whole
message in the array.
I'm using the string "Content-Transfer-Encoding" to define the start of the
message, not clear what ends the message part.
Some rules as to what to expect would be nice, a tool that just does it
would be better!
Thanks Jerry
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/10A40DA57C57438ABC7521B975EACB34@jerryfootePC
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
On Apr 13, 2011, at 8:22 AM, Jerry Foote wrote:
> Can anyone point me to a free tool to parse a email message. I was surprised
> at the varieties of ways that messages are composed. I some guidance as to
> how to locate the message, specifically what defines the start and end of a
> message. I can see all of the tags for From, To, Subjects, For and some
> others I'm not interested in.
OK, I gave everyone a couple of days to chime in, but since they didn't...
Use Python! It has an email module that handles all of that stuff for you! http://docs.python.org/library/email.html
(OK, you *knew* that was coming, right?)
-- Ed Leafe
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/E1B6A0AF-5DC2-47D9-B950-6F7C56FA3F17@leafe.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Ed
Can I used Python with VFP9?
Jerry
-----Original Message-----
From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf
Of Ed Leafe
Sent: Thursday, April 14, 2011 9:33 PM
To: ProFox Email List
Subject: Re: Parse Email File
On Apr 13, 2011, at 8:22 AM, Jerry Foote wrote:
> Can anyone point me to a free tool to parse a email message. I was
surprised
> at the varieties of ways that messages are composed. I some guidance as to
> how to locate the message, specifically what defines the start and end of
a
> message. I can see all of the tags for From, To, Subjects, For and some
> others I'm not interested in.
OK, I gave everyone a couple of days to chime in, but since they
didn't...
Use Python! It has an email module that handles all of that stuff
for you! http://docs.python.org/library/email.html
(OK, you *knew* that was coming, right?)
-- Ed Leafe
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/9F7E3857C5A54DE797BF3584D8C0F3CE@jerryfootePC
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
On 4/14/11 7:43 PM, Jerry Foote wrote:
> Can I used Python with VFP9?
I do it by "shelling out". IOW, write the email to a file on disk, run your python
script on that file, which writes the output to another file, and then open the
output file in VFP.
Paul
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/4DA7C067.6050307@ulmcnett.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Depends how you want to do it. Where are the emails, are they local or
on the web somewhere?
I've written code to automate outlook and also php code to talk directly
to the pop account then used fox to grab the info
Graham
-----Original Message-----
From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On
Behalf Of Paul McNett
Sent: 15 April 2011 05:00
To: GrahamB
Subject: Re: Parse Email File
On 4/14/11 7:43 PM, Jerry Foote wrote:
> Can I used Python with VFP9?
I do it by "shelling out". IOW, write the email to a file on disk, run
your python script on that file, which writes the output to another
file, and then open the output file in VFP.
Paul
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/0AF51B84D903A144B9EE71AEAFE7E81C0EBF92@compsys1.CompySys.local
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
On Apr 14, 2011, at 11:49 PM, Paul McNett wrote:
>> Can I used Python with VFP9?
>
> I do it by "shelling out". IOW, write the email to a file on disk, run your python
> script on that file, which writes the output to another file, and then open the
> output file in VFP.
I worked on an app for a customer that required parsing a lot of irregular text. Regular expressions handled it fine, but using the VB-based control that comes with VFP was very slow. I wrote a routine to do what you describe: write to a temp file, call a Python script that would do the processing and write the output to a different file, then have VFP read in the results and proceed from their. It was amazing how much faster that solution was compared to the "built-in" VB control, even with all that extra shelling.
-- Ed Leafe
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/2AB81A03-99A9-403D-9E5D-C3800D76B05E@leafe.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.