Feature #2

Download attachments on demand

Added by Vladimir Smolyar over 4 years ago. Updated 5 months ago.

Status:In ProgressStart date:11/15/2011
Priority:NormalDue date:
Assignee:Hiroyuki Yamamoto% Done:


Category:-Spent time:-
Target version:-


Below follows actually the quote of my message to Sylpheed mailing list which hasn't ever got any response.

I would like to suggest a slightly changed way of e-mails with attachments treatment.
The problems is: it often happens that a person receives an e-mail with some files attached and wants just to read the text message in such letter rather than downloading it with all the files attached. In my case the current Sylpheed behaviour (downloading all the attachments when I click on the message to see the text) is very inconvenient since I have a very slow connection and have to pay for the amount of traffic I used.
It would be very very nice if you introduced an option to download the attachments only on demand. For example, when I click "Save as..." for some of the attached files.
It doesn't seem as a hard-to-implement feature, but it could make life much more comfortable for a lot of people I believe.

Thank you.


#1 Updated by Hiroyuki Yamamoto over 4 years ago

  • Status changed from New to In Progress
  • Assignee set to Hiroyuki Yamamoto

I suppose you mentions IMAP messages.
I will add an option to download only text part and a feature to download attachments
on demand in the future release.

#2 Updated by Andrey Gursky over 3 years ago

Without such a feature it is impossible to use sylpheed on low-bandwidth networks. Assuming sylpheed is a light-weight client, this feature is essential.
It would be excited if you add it!

Thank you,

#3 Updated by Genghis Khan 11 months ago

I use Linux, and when I see a spam message with an .exe file, I know I have nothing to do with it. I would love to just delete such messages without downloading their attachments.

#4 Updated by Andrey Gursky 5 months ago

Hiroyuki Yamamoto wrote:

I will add an option to download only text part and a feature to download attachments
on demand in the future release.

are you working on it?


#5 Updated by Andrey Gursky 5 months ago

Few years ago I gave up with sylpheed. Now the question is again to give up or not to give up. I would switch to claws-mail, but they have the same problem [1], though recently one figured out, that libetpan supports this already, but not claws-mail itself. Would it be easier to integrate it there? Or should I give a chance trojita. Maybe it supports this out-of-the-box...

Ok, I've looked into the code. And I would propose the following:
- In imap_get_uncached_messages / imap_get_uncached_messages_func (libsylph/imap.c) fetch also BODYSTRUCTURE. This gives us full information of mail parts (and attachments' filenames). The headers should be written to the cache file.
- In imap_cmd_fetch (libsylph/imap.c) fetch not BODY.PEEK[] but BODY.PEEK[#num1.#num2], where #num1 and so on are the IDs from BODYSTRUCTURE, which are either text/plain or text/html. Append the result to the cache (the headers are already there).
- Once user clicks on the attachment and it is not yet in the cache, a question should arise to confirm the downloads. This part will be fetched, the content of the saved cached loaded and parsed and the content of the attachment should be inserted in the raw message, as it would be downloaded as whole. Then save the cache file. Ideally, once user downloads all attachments, the cache file should look exactly as it is now.

I see plugin/attachment_tool/attachment_tool.c can already manipulate the cache file. Perhaps it could be extended with additional "add" operation?

[1] http://www.thewildbeast.co.uk/sylpheed-claws/bugzilla/show_bug.cgi?id=2035

Also available in: Atom PDF