[haiku-development] Re: Accessing the Mail API from scripts

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 23 Dec 2011 10:05:32 +0100 (MET)

Jerry<jquill81@xxxxxxxxx> wrote:
> does anyone know if the API of the Mail program can be accessed via a
> script?

Mail does not export any API besides standard UI scripting abilities. I doubt 
that would be sufficient for what you'd like to have.

> Since the MH/nmh program is not available (yet) for Haiku, I was
> wondering if I could achieve something similar with Mail. The idea was
> to call its functions from within scripts, pass data to it, etc. All
> from script, without accessing the GUI.
> Is it possible?

You can certainly use the Mail Kit to program a replacement for nmh, but unlike 
you have Haiku API bindings for your scripting language, you would need to use 
C++ for this.
OTOH, porting nmh should be pretty much trivial, I'd assume (might compile 
pretty much out of the box).

Bye,
   Axel.


Other related posts: