Subject: Misc header values

From: "Greg Copeland" <[email-masked]>
Date: Fri, 21 Jul 2000 23:34:57 CDT

Hi!

Sorry that this is a repeat of what I posted to the IMAP list, however, I 
didn't realize there was a specific c-client list until after I had already 
posted.  So, if you've already seen this message, I say again, "sorry."  
Nonetheless, I'm hoping for an answer:

I'm currently using c-client to create a mail client.  I was hoping that 
someone could tell me if there is a mechanism to create arbitrary header 
text inside of rfc822 header space?  Specifically, I'd like to be able to do 
return receipts as well as add X-Mailer and X-WhatEverIWant entries as I see 
fit.  Feedback welcome here.  What about fetching misc. values from the 
header?  Also, I've browsed around on the web site and didn't really see 
much in the way of documentation.  Is there a good place to fetch 
documentation on c-client's use (internal and external functions)?

Thanks,
	Greg

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

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

---

From: John-Paul Robinson <[email-masked]>
Date: Sat, 22 Jul 2000 15:03:03 -0500

> fit.  Feedback welcome here. 

While I'm not sure if this is the only way to do it, you can look to the
send.c file in the pine distribution for an example.  rfc822_output()
normally calls rfc822_headers() to construct the header from the
ENVELOPE, however, rfc822_headers() only supports the fields in the
ENVELOPE.  In order to include extra headers you can redefine
rfc822_ouput() with the SET_RFC822OUTPUT function of mail_parameters(). 

This is what pine's call_mailer() routine does before invoking
rfc822_output() via smtp_open().  Pine's version of the output function
is post_rfc822_output() which calls pine_rfc822_output() with a METAENV
structure that contains both the c-client ENVELOPE and Pine-specific
header lines.  The function pine_rfc822_output() calls
pine_rfc822_header(), which processes Pine's headers.  

> What about fetching misc. values from the
> header? 

I think you want to use mail_fetch_header().  It returns a string (and
it's size) that contains the full header of the message.  You can also
pass a list of header lines you want and the function will only return
those to you.

> Also, I've browsed around on the web site and didn't really see

I believe, right now, it's still read the RFCs for the relevant parts of
the library functions, read the internal.txt document (understanding
that some minor discrepancies exist), and then read the code.  The file
mail.c is pretty straight forward once you get familiar with the data
structures. Also, Pine provides some good examples on how to use the
toolkit library functions.

There's a book coming out in August from O'Reilly titled "Managing
IMAP".  I've only see the links to it on Fat Brain, and O'Reilly has
some data on it. Mark has mentioned a book by Kevin Johnson in the past
that covers a bunch of the protocols on Internet messaging, it's titled
"Internet Email Protocols: A Developer's Guide."  I've seen this at the
book store but haven't read it. 

Hope this stuff helps,

John-Paul

---

From: [email-masked]
Date: Fri, 28 Jul 2000 02:15:08 -0500 (CDT)

Well back in Sept of 1998, I posted a question about this, and Karsten Ballueder
responded that he had patches to allow arbitrary headers to be added.  I didn't
really like the way he did it, so I did my own patches.  Which I never posted...
I also don't like the way that pine does it, with replacing whole functions that
really should be in the library, and could be, if this capability was added..

Karsten Ballueder is one of the people working on the Mahogany mail client which
uses WxWindows and C-Client to do it's stuff.  You might want to look in the 
archives for that period to see if you can find the entire thread..  The subject
on my message was "C-Client API Documentation?"

Bill Suetholz

> book store but haven't read it. 

----------------------------------
E-Mail: [email-masked]
Date: 28-Jul-00
Time: 02:09:03

This message was sent by XFMail
----------------------------------