Subject: Re: copy imap body in the smtp message using smtpsend()

From: "Koos S." <[email-masked]>
Date: Thu, 09 Nov 2000 15:40:06 GMT

The body  variable is only filled with data concerning the (mime)body. You 
need to fetch the actual data explicitly and fill the body with this data.

>From: Emmanuel Sellier <[email-masked]>
>To: "C-Client (E-mail)" <[email-masked]>
>Subject: copy imap body in the smtp message using smtpsend()
>Date: Thu, 9 Nov 2000 12:31:06 +0100
>
>Hello,
>
>I try to "forward" an imap message to an smtp mailbox.
>* I have a body and envelope using :
>	ENVELOPE *envelope;
>	BODY * body;
>
>	envelope=mail_fetchstructure(_stream, msgno, &body);
>
>* then i call the smtpsend() methode passing both envelope and body
>parameters and a new target addresss, replacing the <to> field in the
>envelope.
>	smtpsend(0, envelope, fwdMailbox, body);
>
>* the original smtpsend was modified as  :
>int smtpsend(long debug, ENVELOPE *msg, char *to, BODY *body)
>...
>   msg->to=NULL;
>   rfc822_parse_adrlist (&msg->to,to,curhst);
>...
>if (smtp_mail (smtp_stream,"MAIL", msg, body))
>		TRACE("smtpsend(%s) : SMTP send ok", _name);
>...
>
>* the SMTP mail is sent but body is empty ??? does someone know what is
>going wrong ?
>
>Thanks a lot
>
>Emmanuel Sellier
>DATAMEDIA
>www.irisa.com
>Paris - France
>
>--
>------------------------------------------------------------------
>  For information about this mailing list, and its archives, see:
>  http://www.washington.edu/imap/c-client-list.html
>------------------------------------------------------------------

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.