Subject: rfc822_parse_msg

From: [email-masked]
Date: Sun, 14 Mar 1999 11:54:21 -0400

Has anyone used rfc822_parse_msg to build ENVELOPE and BODY 
structures?  It parses the envelope information but during
the body it omits the actual data and only prints the 
MIME headers.

I'm using:
	rfc822_parse_msg(&env, &bdy, header, strlen(header), &string, 
		defaultdomain, 0)

and then passing it to smtp_mail(stream, "MAIL", env, body)

Do I need to add the content manually after the BODY is defined
from parse_msg ?   Setting up my initial text part of the
message was a matter of:
	bdy->nested.part->body.contents.text.data = mmessagetext;

... not sure how to add base64 attachments yet though.. I'll have
to go hunting for it..

If anyone can give pointers, I'd appreciate it..

THanks
Derek Billingsley
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Sun, 14 Mar 1999 10:37:36 -0800 (PST)

The basic answer to your question is that the BODY structure used by
smtp_mail() is different than that used by rfc822_parse_msg().

You can not use rfc822_parse_msg() results to feed to smtp_mail().  There's no
answer for "how do I do this" because the real answer is "you don't".

In general, you do not call rfc822_parse_msg() directly.  Instead, you use the
top-level mail_fetch_???() functions.  You build your own BODY structure when
calling smtp_mail().