chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Parsing EMail


From: Karsten Gebbert
Subject: Re: [Chicken-users] Parsing EMail
Date: Mon, 25 Mar 2013 13:11:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

On 03/25/2013 11:55 AM, Andy Bennett wrote:
Hi.

I'm relatively new to chicken and this list, so bear with me :)

My aim is to parse EMails (for using with procmail, for instance) but
I'm a little stuck/confused by my options. I've been playing with
hato-mime.scm (hg cloned from google source project), and I also looked
at internet-message, but without trying to sound like I'm complaining,
the docs are somewhat meager for the beginner that I definitely am :)
Hato is definitely the suite you want if you need to dip into the MIME
sections, but the docs are somewhat sparse.

Cool, thanks, thats quite helpful!

Which version did you clone?

http://code.google.com/r/datenhobel-hato-egg-update/

that one :)

...has some updates which allow it to compile for later Chickens but not
all the modules are included.

A few weeks back I got some help with getting this install by some friendly schemers on the IRC :)

So my question is: could somebody point me to some example code for
either one or the other library that can get me started? I basicall
would like to be able to parse message into they parts (different bodies
for content-types, attachments..) and play with them in chicken.
I've not used Hato before but I've taken a quick look at

http://code.google.com/r/datenhobel-hato-egg-update/source/browse/hato-mime.scm

...and it strikes me that calling (mime-message->sxml) and passing it a
message on the current-input-port should get you a data structure that
you can explore.


Ah I overlooked this, thank you. It seems It does indeed just do what I need :)

Alternatively, there is this example in the source:

http://code.google.com/r/datenhobel-hato-egg-update/source/browse/examples/user.filter


I don't understand though: is the parsing explicitly invoked, or are these rules matched against an already parsed message?


Thanks for your swift reply!

k




Regards,
@ndy





reply via email to

[Prev in Thread] Current Thread [Next in Thread]