Next: , Previous: Connecting and sending commands to listserv, Up: Tutorial

7.2 Retrieving Files and Mail Templates

For many commands you don't need to use listserv_command and parse the results: liblistserv does this for you. In the previous chapter you retrieved with listserv_command the file default.mailtpl. You can do it also with the command

       char *default_mailtpl = listserv_getfile(l, "default.mailtpl");

Now imagine you want to get the active ADD1 mail template for the list ABC-L . You can try to find it in abc-l.mailtpl, site.mailtpl or default.mailtpl, but you can rely on liblistserv to do all this tasks for you

        char *add1_template = listserv_getmail_template(l, "ABC-L", "ADD1");