Re: Setting custom headers in outgoing message using c-client
Vadim Zeitlin <[email protected]> Tue, 22 May 2012 01:52:30 +0200
| Newsgroups | gmane.mail.imap.uw.c-client |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 21 May 2012 20:02:21 +0000 "David C. Choweller" <[email protected]> wrote: DCC> I would like to use the c-client library to set custom headers in an DCC> 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. However, DCC> this does something I don't want it to. For example, if I 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 to DCC> 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 [email protected] http://mailman2.u.washington.edu/mailman/listinfo/imap-uw
signature.asc
(application/pgp-signature, 196 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iEYEABECAAYFAk+61T4ACgkQBupB3k9sHoa4+QCaA7BcxSy2hYwNonWu+d6L9WLB r5EAnikM9+q+y5f7FdZTWov2Mxt7+0Ef =fn7j -----END PGP SIGNATURE-----