Subject: sending an embedded message with c-client (as an attachment in a TYPEMULTIPART e-mail)

From: Charles Dorner <[email-masked]>
Date: Sun, 17 Oct 2004 09:22:35 -0700

Hello,

   I'm trying to format an envelope and body for sending through the 
smtp_mail() function.  The message is type TYPEMULTIPART and has an 
attachment of type TYPEMESSAGE with subtype of RFC822.  However, I can't 
find any way to correctly set the values in the body structure so that 
c-client will write the attached embedded message to the e-mail.
   I first thought that the body.nested.msg->env and 
body.nested.msg->body  would be the correct things to set from the 
comments on the BODY structure.  However, when I used this, the 
boundaries and mini headers were set correctly, but nothing was printed 
from the actual embedded message itself.  So I then looked through the 
code executed by smtp_mail() and found it called rfc822_output() for the 
data output, which writes the headers to the e-mail and then calls calls 
rfc822_output_body() to output the body.  In rfc822_output_body() it 
appears that only body.nested.part is examined on TYPEMULTIPART messages.
   The best solution then is to use the c-client header and body writing 
functions to write the embedded message headers and body to text, and 
then put the text in body.nested.part->body.contents.text.data.  Is that 
right or am I totally off?
   Thanks for any help that can be provided!

Charles Dorner
-- 
------------------------------------------------------------------
 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, 17 Oct 2004 11:05:55 -0700 (Pacific Daylight Time)

On Sun, 17 Oct 2004, Charles Dorner wrote:
> attachment of type TYPEMESSAGE with subtype of RFC822.

Set the TYPEMESSAGE text as if it was type TYPETEXT.  Typically, you use 
TYPEMESSAGE when you are forwarding a message, which means that you 
already have it as a text string.  It's therefore pointless to deconstruct 
the message just to have c-client reconstruct it; especially since the 
usual point of forwarding as MIME is to forward the message as-is.

Look at the source code for Pine to see an example.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.

---

From: Charles Dorner <[email-masked]>
Date: Sun, 17 Oct 2004 11:24:03 -0700

Mark Crispin wrote on 10/17/2004 11:05 AM:

> Set the TYPEMESSAGE text as if it was type TYPETEXT.  Typically, you 
> use TYPEMESSAGE when you are forwarding a message, which means that 
> you already have it as a text string.  It's therefore pointless to 
> deconstruct the message just to have c-client reconstruct it; 
> especially since the usual point of forwarding as MIME is to forward 
> the message as-is.

Unfortunately, I'm in between c-client and the actual program the user 
uses to forward the message, and I have no way to get the original 
source of the e-mail, I get information about the embedded message to 
forward (not the source, unfortunately) and need to construct the 
message myself.  So that solution doesn't work for me.  I could 
reconstruct as much of the text of the e-mail as possible, but sometimes 
that might not be very much.  Are there any other suggestions?

---

From: Charles Dorner <[email-masked]>
Date: Sun, 17 Oct 2004 11:31:10 -0700

Go ahead and disregard my last e-mail.  I found a workaround.