Re: Adding header (envelope) fields to messages

DINH Viêt Hoà <[email protected]> Sat, 19 Dec 2009 09:52:23 +0100
Newsgroups gmane.mail.libetpan.user
Message-ID <[email protected]>
First, write the headers to the file using :

f =3D fopen('maildir-message-file', 'w');
col =3D 0;
mailimf_fields_write_file(f, &col, fields);
// then, write the body
fprintf(f, "%s", body);

Best Regards,

On Thu, Dec 17, 2009 at 4:33 PM, David Bremner <[email protected]> wrote:
>
> I have been trying to write a simple command-line example that adds or
> removes a keyword from all of the messages in a mailbox (at the moment,
> maildir).
>
> I get to the point of adding a new field using
>
> =A0mailimf_fields_add(fields,newfield);
>
> But now I'm stuck as far actually writing the changes back to disk. =A0I
> call mailmessage_check(), and mailfolder_check(), but that doesn't seem
> to do it (the documentation only mentions flags in fact).
>
> Please CC me with any ideas. =A0I attach the complete example.
>
>
> -------------------------------------------------------------------------=
-----
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and e=
asy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Libetpan-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libetpan-users
>
>



-- =

DINH Vi=EAt Ho=E0

---------------------------------------------------------------------------=
---
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev =