Sounds promising. I'll take a look.  Thank you.

David

-----Original Message-----
From: imap-uw-boun...@mailman2.u.washington.edu 
[mailto:imap-uw-boun...@mailman2.u.washington.edu] On Behalf Of Vadim Zeitlin
Sent: Monday, May 21, 2012 4:53 PM
To: imap-uw@u.washington.edu
Subject: Re: [Imap-uw] Setting custom headers in outgoing message using c-client

On Mon, 21 May 2012 20:02:21 +0000 "David C. Choweller" 
<david.chowel...@pb.com> wrote:

DCC> I would like to use the c-client library to set custom headers in
DCC> an outgoing message (sent using smtp_mail() function).
DCC>
DCC> Which structure members of the BODY or ENVELOPE do I need to set to do 
this?

 I don't know if this changed since then but when we wrote the code to do it 
(granted, it was in 1998) there was no simple way to do this in c-client and we 
had to use a custom output redirector, i.e. a function set by SET_RFC822OUTPUT, 
to output the headers manually. The full code is at the end of this file

http://mahogany.git.sourceforge.net/git/gitweb.cgi?p=mahogany/M;a=blob_plain;f=src/mail/SendMessageCC.cpp;hb=HEAD

DCC> I tried using the PARAMETER *parameter member of the BODY.
DCC> However, this does something I don't want it to.  For example, if I
DCC> set
DCC> body->parameter->attribute  <--  "X-Custom-Header"
DCC> body->parameter->value  <--  "X-Custom-Value"
DCC> body->parameter->next  <--  NULL
DCC>
DCC> What I get in the resulting email message is:
DCC>
DCC> Content-Type TEXT/PLAIN; X-Custom-Header=X-Custom-Value
DCC>
DCC> In other words, the parameter and value I specified have been added
DCC> to the "Content-Type" header, rather than creating a new header
DCC> "X-Custom-Header".

 This is correct because the parameters here are MIME parameters, not headers.

 Regards,
VZ

________________________________

_______________________________________________
Imap-uw mailing list
Imap-uw@u.washington.edu
http://mailman2.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to