login about faq

Hi,

I am fetching the mailboxes using :

  CkoMailboxes *mailBoxes = [[CkoMailboxes alloc]init];
  mailBoxes = [imap ListMailboxes:@"" wildcardedMailbox:@"*"];

Is there any way to identify the mailbox type.

For eg: Inbox folder should not get deleted. Thus while checkin that, when i try to delete INBOX folder, i get the following error log.

ChilkatLog: DeleteMailbox:

Failed to delete mailbox...
imapDeleteResponse: aaaj NO [CANNOT] Internal folder cannot be deleted. (Failure)
Failed.

--DeleteMailbox

--ChilkatLog

This log mentions INBOX is an Internal folder.

So, are there any more types which we can get with mailbox to differentiate between Primary mailboxes like: Inbox, Drafts, Sent, Trash and other custom folders. Accordingly we have to reflect on UI when user wants to edit mailboxes.

Thanks.

asked Jul 16 '14 at 09:29

Madhura's gravatar image

Madhura
16157


See the API for the Mailboxes class: http://www.chilkatsoft.com/refdoc/csMailboxesRef.html

Examine the flags of each mailbox...

link

answered Jul 16 '14 at 10:26

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Hi.. thanks for your response. But its still unclear to me. I checked the GetFlags method on the CKoMailboxes received. And for a gmail account i am receiving following flags:

INBOX: HasNoChildren

*Madhura123: HasChildren Madhura123/Madhura1234: HasNoChildren*

Notes: HasNoChildren

Personal: HasNoChildren

Receipts: HasNoChildren

Travel: HasNoChildren

[Gmail]/All Mail: HasNoChildren,All

[Gmail]/Drafts: HasNoChildren,Drafts

[Gmail]/Important: HasNoChildren,Important

[Gmail]/Sent Mail: HasNoChildren,Sent

[Gmail]/Spam: HasNoChildren,Junk

[Gmail]/Starred: HasNoChildren,Flagged

[Gmail]/Trash: HasNoChildren,Trash

From this log its still not clear, which are the primary folders and which are custom made by the user. Like for eg: Madhura123: HasChildren

Madhura123/Madhura1234: HasNoChildren only specifies whether the mailbox contains any subfolders or not.

So is there any way to get the type of the folder.

Thanks again in advance for any help.. !

link

answered Jul 17 '14 at 11:18

Madhura's gravatar image

Madhura
16157

Where did you get the words from instead of the path? eg. "Junk" instead of "[Gmail]/Spam"?? This would really help for displaying them properly in TableView, please? Thanks!

(Jul 20 '14 at 18:50) emotality
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
×14
×1

Asked: Jul 16 '14 at 09:29

Seen: 910 times

Last updated: Jul 20 '14 at 18:50

powered by OSQA