> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# emailfolder

> EmailFolderProvider gives you the folder hierarchy of a given mail account

## "emailfolder" MDO List

EmailFolderProvider gives you the folder hierarchy of a given mail account

Implemented by the <see cref="T:SuperOffice.CRM.Lists.EmailFolderProvider">EmailFolderProvider</see> class.
The name of the MDO list is 'emailfolder'.

## Additional Attributes

| Description                                      | Name      | Example Value |
| ------------------------------------------------ | --------- | ------------- |
| Id of the account for which you want the folders | accountId | 0             |
| Use hierarchy                                    | hierarchy | true          |

Separator: &

## Sample Request

```http! theme={null}
GET /api/v1/MDOList/emailfolder
Authorization: Basic dGplMDpUamUw
Accept: application/json; charset=utf-8
Accept-Language: *

```

## Sample Code

```cs theme={null}
var listProvider = ClassFactory.CreateRequired<SuperOffice.CRM.Lists.ISoListProviderFactory>().Create("emailfolder", forceFlatList: true);
foreach (var item in listProvider.RootItems) {
    Console.WriteLine("{0} {1} {2} {3}", 
         item.Id, ResourceManager.ParseInlineResources(item.Name), item.StyleHint, item.ExtraInfo);
}
```

## Sample Output

| Id | Name    | StyleHint | ExtraInfo |
| -- | ------- | --------- | --------- |
| 2  | Example |           |           |

## Related MDO Lists

* "emailfolderheadings"
* "emailfolderheadingswithallitem"
* "emailfolderheadingswithallitemwithnoselection"
* "emailfolderheadingswithnoselection"
* "emailfolderwithallitem"
* "emailfolderwithallitemwithnoselection"
* "emailfolderwithnoselection"


## Related topics

- [SuperOffice.WebApi.Data.EMailFolder](/en/api/reference/webapi/SuperOffice.WebApi.Data.EMailFolder.md)
- [SuperOffice.WebApi.Agents.EMailAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.EMailAgent.md)
- [SuperOffice.WebApi.Agents.IEMailAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IEMailAgent.md)
- [email_folder table](/en/database/tables/email-folder.md)
- [SuperOffice.WebApi.Data.EMail SetSubscriptionRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.EMail_SetSubscriptionRequest.md)
- [What's new in version 10.3.9.718](/release-notes/database/changes-10.3.9.md)
