Commit eaeae738 eaeae738652c703078b622d1637fe6ed1251cec3 by Sam Roberts

No longer relevant to the current APIs.

1 parent 581bf631
1 #include "mailbox.h"
2 #include <paths.h>
3
4 int
5 main (int argc, char *argv[])
6 {
7 mailbox *mbox;
8 char *user;
9 char *body;
10 char mailpath[256];
11 int i;
12
13 user = getenv ("USER");
14 snprintf (mailpath, 256, "%s/%s", _PATH_MAILDIR, user);
15 mbox = mbox_open (mailpath);
16 for (i = 0; i < mbox->messages; ++i)
17 {
18 body = mbox_get_body (mbox, i);
19 printf ("%s\n", body);
20 }
21 mbox_close (mbox);
22 }
23