chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Parsing EMail


From: Andy Bennett
Subject: Re: [Chicken-users] Parsing EMail
Date: Mon, 25 Mar 2013 10:55:35 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.9) Gecko/20121014 Icedove/10.0.9

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.

Which version did you clone?

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

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


> 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.


Alternatively, there is this example in the source:

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





Regards,
@ndy

-- 
address@hidden
http://www.ashurst.eu.org/
0x7EBA75FF




reply via email to

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