Subject: Using c-client. Yes or No?

From: Vlatko Surlan <[email-masked]>
Date: Fri, 25 Apr 2003 16:53:46 +0200 (METDST)

Greetings.

    This is my first mail here and I'm a bit out of resources so I have to
ask here. I hope noone will be offended if some reiterations occure.

    I am trying (learning interface) to use c-client. I intend to
use it in a server that will accept input through mail. I was wondering
about how fast c-client is? To be more precise is it a better option to
write one mailbox format specific code that brings speed or use c-client
which brings reliability (tested code), and reduces my own code? And
examples wise, skimming through pine code is a nightmare isn't there any
shorter example on how to do following simple things:

 1) Check if there is new mail
 2) Load text parts of mails to buffer
 3) Delete all processed mail

This is basically all the functionality I need. So mastering pine is a bit
of an overkill and any help by you guys would be greatly appreciated.

	Vlatko Surlan, PMF - Zagreb, Matematicki odjel, student
	alternate email : [email-masked]
	phone : 385 (0) 98/1722-187

-- 
------------------------------------------------------------------
 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: Fri, 25 Apr 2003 08:31:17 -0700 (PDT)

Although reading the Pine code will disclose many complex techniques in
using c-client, that is probably not the best course of action for a
beginner.

I suggest that instead, you look at the various bundled utilities in the
UW IMAP toolkit:

mtest is a *very* basic MUA that uses c-client; note that it makes
numerous shortcuts in the name of simplicity and I wouldn't recommend it
as an example of a production-quality program.

mailutil and imapd are great examples of real, production-quality,
programs which use c-client.  They are much more complex than mtest, but
quite a bit simpler than Pine.  I suggest looking at mailutil first.

The UW IMAP toolkit is in:
	ftp://ftp.cac.washington.edu/mail/imap.tar.Z

This is the same as the "imap" directory in the Pine sources, so if you
already have Pine sources just look in the imap directory.

I think that in the long run, although c-client may be overkill for your
specific project, it is also much simpler to write your project using
c-client than to write it by hand.  c-client takes care of so many nasty
little issues that novice programmers often miss.

Just as an example, I could write your project, using c-client, in less
than an hour of work.  It would take much longer to do so without
c-client.  Of course, I wrote c-client and know exactly how it works.  :-)

-- Mark --

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