Hi,
I am trying to generate an ENVELOPE and a BODY from a single file
message store on a local disk (a .eml file, containing a raw RFC822
message).
I was hopping the phile driver would do the job for me and that I wont
have to use directly founctions such as rfc822_parse_msg(). But I cannot
make it to work properly, for some reason the phile driver generates an
ENVELOPE & BODY which does not represent the content in the file (the
raw RFC822 message) but rather the file itself!
Here is what I do (simplified):
mail_link (&philedriver); /* link in the phile driver */
mail_link (&dummydriver); /* link in the dummy driver */
long debug = T;
MAILSTREAM * stream = mail_open(NULL,
"/Users/ducarroz/Desktop/sample.eml", debug ? OP_DEBUG : NIL);
if (stream)
{
BODY *body;
ENVELOPE *envelope = mail_fetchstructure(stream, 0, &body);
if (envelope)
printf("subject: %s", envelope->subject);
mail_close(stream);
}
I can see that the philedriver is correctly called and does open the
file. But envelope->subject contains the file path rather than the
message's subject!
Is it the right way to deal with single file? what am I doing wrong?
Thanks for your help,
Jean-François Ducarroz
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw