1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999-2021 Free Software Foundation, Inc.
3
4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3, or (at your option)
7 any later version.
8
9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. */
16
17 #ifdef HAVE_CONFIG_H
18 # include <config.h>
19 #endif
20 #include <stdlib.h>
21 #include <stdio.h>
22 #include <mailutils/util.h>
23 #include <mailutils/cli.h>
24
25 char *capa[] = {
26 "address",
27 NULL
28 };
29
30 static struct mu_cli_setup cli = { NULL };
31
32
33 int
main(int argc,char * argv[])34 main (int argc, char *argv[])
35 {
36 mu_cli (argc, argv, &cli, capa, NULL, &argc, &argv);
37
38 if (argc == 0)
39 printf ("current user -> %s\n", mu_get_user_email (0));
40 else
41 {
42 int i;
43 for (i = 0; i < argc; i++)
44 printf ("%s -> %s\n", argv[i], mu_get_user_email (argv[i]));
45 }
46
47 return 0;
48 }
49
50