ImapClient ListFolders() only returns INBOX folder (C# .NET)

Hi,

I have a problem with the ListFolders()-method. It returns just the INBOX-Folder. I created several folders in Outlook and on the webinterface of fastmail with no success. I tried this documentation link. As I mentioned before, our E-Mail-Provider is [fastmail.fm] (https://www.fastmail.fm) and the IMAP-address is “mail.messagingengine.com”.

Hi Drew,


Thank you for your inquiry.

Can you please clarify your scenario. You have mentioned that you have created several folders using fastmail’s web interface. Are these folders present on the Root of your mailbox or they exist as sub-folders of Inbox?

Regards,

Thank you for the fast reply.


The created folders are on the root of my mailbox.

Regards
drew

Hi Drew,


Thank you for the information.

I have just created an account (free) on fastmail.fm to replicate your said issue on our end. We will keep you posted with updates.

Meanwhile, can you please give a try to latest version of Aspose.Email for .NET v 1.2.0 and feed us back with your results.

Regards,

Hi Babar

I updated Aspose.Email to the latest version 1.2.0 but no changes. It still shows just the inbox.

I tried ListFolders() with my [me.com](http://me.com/) mailbox and this one shows all my folders correctly.

*** EDIT ***

I also figured out that the TotalMessageCount returns 0 wich is also a little bit strange…

Regards

drew

Hi Drew,


I am trying to connect to the FastMail.fm via ImapClient. My program hangs up at client.Connect(true). Can you please confirm the host address.

C#
client = new ImapClient(“mail.messagingengine.com”, “username”, “password”);
client.Connect(true);

Hi Babar


your method with client.Connect(true) didn’t work for me either.

client.Connect() work for me. without the "true"

Regards
drew

Hi Drew,


Thank you for the information.

Client.Connect() worked for me too. In fact I was able to browse all folders on my FastMail.fm account using the same example as shared by you in your original post. I have noticed that the root folder for FastMail.fm account is the “INBOX” and all other folders (by default or manually created) are accessed like “INBOX.Sent Items” and “INBOX.Drafts” etc.

Before executing my sample project, I have created a folder on the root by name of “aFolder” (please check the snapshot attached MailBox.png). I didn’t have any messages in that folder but when my project iterated over the folders to save messages, this folder is accessed to retrieve the messages. That means, if this folder would have messages, they would have got saved. Please check other snapshots for your reference.

Hi Barbar


Sorry I was quite busy the last few days, but it’s working now!
Thanks a lot!

Regards drew