[sylpheed:31336] Re: [libsylph] How to get a detail (body, headers, etc) of a message
Hiroyuki Yamamoto
hiro-y at kcn.ne.jp
Tue May 22 15:35:00 JST 2007
Hello,
On Mon, 21 May 2007 14:43:38 +0200
Massimiliano Calamelli <mcalamelli at gmail.com> wrote:
> Hi all, i'm new in this list, i'm massimiliano, an italian user of
> Sylpheed (WinXp,Linux,FreeBSD), and now i'm playing with libsylph, in
> order to build an email client using EFL (Enlightenment Foundation
> Libraries, web.enlightenment.org).
Thanks for using LibSylph :)
> Atm i can obtain and use folders list and messages from a folder (here
> a simple screenshot, http://mcalamelli.netsons.org/files/elpheed.jpg),
> i've read many times examples/ dir, but i don't understand how to get
> a detail (body, headers, etc) from a single message. Tips and/or
> suggestions?
You can get header information with the following functions:
GSList *procheader_get_header_list_from_file (const gchar *file);
GSList *procheader_get_header_list (FILE *fp);
GSList *procheader_get_header_list_from_msginfo (MsgInfo *msginfo);
GPtrArray *procheader_get_header_array (FILE *fp,
const gchar *encoding);
GPtrArray *procheader_get_header_array_asis (FILE *fp,
const gchar *encoding);
GPtrArray *procheader_get_header_array_for_display
(FILE *fp,
const gchar *encoding);
and message body with:
FILE *procmime_get_text_content (MimeInfo *mimeinfo,
FILE *infp,
const gchar *encoding);
FILE *procmime_get_first_text_content (MsgInfo *msginfo,
const gchar *encoding);
(MimeInfo can be obtained with procmime_scan_message())
> Here's a little wishlist for libsylph:
> 0) More documentation;
Sorry for the Japanese-only documents (in doc directory). I (or
someone?) will translate it to English in the future.
> 1) Indipendence from ~/.sylpheed-2.0: atm the reference files
> (sylpheedrc and others) are hardcoded into sources, it will be useful
> if it can be parametric, like syl_init() (without parameter) falls to
> ~/.sylpheed-2.0, or syl_init("somedir") refers to somedir tree;
The rc dir can be configurable with set_rc_dir("somedir") after
syl_init(). But syl_init() taking some parameters might also be good.
--
Hiroyuki Yamamoto <hiro-y at kcn.ne.jp>
More information about the Sylpheed
mailing list