Subject: How to cancel retrieving mail?

From: "Shawn Walker" <[email-masked]>
Date: Fri, 1 Aug 2003 14:18:30 -0500

How to cancel retrieving a message from the IMAP server?  Say there is a
rather large email and the user decide to cancel the download, that is just
one example.  But, I don't want to close the mail stream session.

I know this would have to be in a thread, but what to do to signal c-client
to abort the download?

Thanks!
Shawn

---

From: Mark Crispin <[email-masked]>
Date: Mon, 18 Aug 2003 16:12:07 -0700 (Pacific Daylight Time)

> one example.  But, I don't want to close the mail stream session.

The simple answer is "you can't".

If you want to have a cancelable download, you need to do a series of
partial fetches (e.g. by calling mail_partial_body()) and allow a
cancellation after each step of the series.  Look at the Pine source code
since Pine works this way.

-- Mark --

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