No longer relevant to the current APIs.
Showing
1 changed file
with
0 additions
and
23 deletions
examples/showmail.c
deleted
100644 → 0
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 |
-
Please register or sign in to post a comment