login about faq

Hi.. In my project, we don't want to download the attachments when we fetch the email. The attachments should be downloaded one by one, once the Mail details are shown and when user clicks on some attachment. We have our Data class which stores the CkoEmail email details. And we use our Data class to show the details on the UI. We don't store directly the CkoEmail object. Is there any way, to download the email attachments some time later after fetching the CkoEMail which we are not persisting as we are having the details in our Data class.

Thanks

asked Jul 15 '14 at 02:01

Madhura's gravatar image

Madhura
16157


Hi!

I use C#, but I think your code wil be the same. You should know attachment index and uid of the message. Use code like this:

        Email email = _imap.FetchSingleHeader(uid, true);
        if (email != null)
            var data = _imap.FetchAttachmentBytes(email, attachmentIndex);
link

answered Jul 16 '14 at 03:43

kuligintim's gravatar image

kuligintim
316911

ok.. thanks for your response ..

(Jul 16 '14 at 08:45) Madhura

See the AutoDownloadAttachments property in the online reference documentation: http://www.chilkatsoft.com/refdoc/csImapRef.html

Set the AutoDownloadAttachments property = false. Then you may download the emails without attachments. You could then fetch the full email at a later time by setting AutoDownloadAttachments = true and re-fetching. Unfortunately, it's not possible to download each attachment within a single email separately.

link

answered Jul 16 '14 at 09:59

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

is this is set to true, where does it save to because mine is true and I dont see it anywhere in my application? :( i use iExplorer to browse through my apps' directories.

(Jul 23 '14 at 21:29) emotality

AutoDownloadAttachments does not mean the attachments are saved to files. It means that the attachments are downloaded from the IMAP server and exist within the IMAP object in memory. Your program may subsequently choose to call methods in the IMAP API to save the attachments to files.

(Jul 24 '14 at 19:38) chilkat ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×94
×22
×7

Asked: Jul 15 '14 at 02:01

Seen: 1,019 times

Last updated: Jul 25 '14 at 18:12

powered by OSQA