Subject: | |
From: | |
Reply To: | |
Date: | Thu, 22 Apr 2010 15:01:06 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On Apr 22, 2010, at 2:42 PM, Marc Bossiere wrote:
> Well I knew it was plain text, but my problem then is I could really use the rules it follows so
> that I can write a script to extract (reliably) the basic email format without all the other
> garbage, such as:
> From: [log in to unmask]
> To: [log in to unmask]
> Date: April 22, 2010
> Subject: Sample email
> Then the body of the mail here
>
> The trouble is that I've looked over many sample emails in EML format and I can't get a
> handle on the structural logic too well. I would prefer a clear explanation of it so I can script
> a solution myself, but if someone already has a script for this conversion I'm not too proud to
> use it!
>
> Marc
>
Not entirely sure what an EML file is, but if it just the raw email then Headers come first with the name of the header (From, Subject, To) beginning a line, followed by a colon. Any continuation lines must begin with whitespace. Headers are separated from the body by a blank line.
The rfc defining email message format can be found here http://www.ietf.org/rfc/rfc2822.txt
If you don't wan to tear the thing apart yourself, Mail should be able to open a .EML file and is reasonable scriptable.
-Mark
Wondering why Indesign says something doesn't exist, but when I copy the event log it says it does.
|
|
|