Subject: Re: [sup-talk] Automatically saving all attachements

From: Ico <[email-masked]>
Date: Wed, 30 Jan 2013 10:57:56 +0100

* On Wed Jan 30 10:32:16 +0100 2013, Gaute Hope wrote:
 
> Maybe there is some inspiration to be found in the save_all_to_disk
> function (keypress 'A' in thread view mode):

Just what the doctor ordered, thanks for the hint!
-- 
:wq
^X^Cy^K^X^C^C^C^C

---

From: "Edward Z. Yang" <[email-masked]>
Date: Tue, 29 Jan 2013 15:40:28 -0800

No, but OfflineIMAP+Sup effectively does this (as the attachments
will be stored with your mail).

A hook like this wouldn't be too hard to implement, but you will need to
think carefully about intended semantics: if you open an email twice,
should it save the attachment twice? If the hook is on-receive, what
should the attachment be named?  How hard is it to find the attachment
you actually want, esp if you receive many?  How do you deal with
multipart messages (txt + HTML versions; the HTML counts as an
"attachment").

Cheers,
Edward

Excerpts from Ico's message of Tue Jan 29 10:50:23 -0800 2013:
> Does anyone happen to have a hook that automatically saves all
> attachements to a given directory when receiving or opening an e-mail?
> 
> Thanks,
> 
> Ico
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Ico <[email-masked]>
Date: Tue, 29 Jan 2013 19:50:23 +0100

Thanks,

Ico

---

From: Gaute Hope <[email-masked]>
Date: Wed, 30 Jan 2013 10:32:16 +0100

https://github.com/sup-heliotrope/sup/blob/master/lib/sup/modes/thread-view-mode.rb#L375

- gaute