Help / WLanguage / WLanguage functions / Communication / Managing emails
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Returns the list of folders of an IMAP session.
MySession is emailIMAPSession
// List of folders
FolderList = MySession.ListFolder(LstFolderAll + LstFolderType)
// FolderList contains for example:
// "Personal folders" + TAB + folderPersonal + CR + ...
// "Personal folders\Inbox" + ...
// TAB + folderInbox + CR + ...
// "Personal folders\Inbox\Work" + ...
// TAB + folderGeneric + CR + ...
// "Personal folders\Inbox\Personal" + ...
// TAB + folderGeneric + CR +...
<Result> = <Session>.FolderList([<Option>])
<Result>: Character string
List of folders. The different folders are separated by CR characters (Carriage Return). The format of the result depends on the constant used:
LstFolderAll<Name of Folder1> + CR + <Name of Folder2> + CR +...
(Default value)
<Name of Folder1> + CR + <Name of Folder2> + CR +...
LstFolderSorted<Name of Folder1> + CR + <Name of Folder2> + CR +...
LstFolderType<Name of Folder1> + TAB + "Type of Folder1> + CR + <Name of Folder2> + TAB + "Type of Folder2> + CR +...
<Name of FolderX>: Full name of folder. For example: "Personal folders\Inbox\Work".
<Type of FolderX>: Type of listed folder. This parameter can correspond to:
  • folderDraft: Folder for the drafts
  • folderContact: Folder for the contacts and for the groups of contacts
  • folderRecycleBin: Folder for the deleted elements
  • folderOutbox: Folders for the emails that will be sent
  • folderSentEmail: Folder for the outgoing emails
  • folderGeneric: Generic folder (folder created by the users)
  • folderLog: Folder for the logs
  • folderNote: Folder for the notes
  • folderPersonal: Root of the "Personal folders" folder
  • folderInbox: Folder for the incoming emails
  • folderAppointment: Folder for the appointments
  • folderTask: Folder for the tasks
If an error occurs, the ErrorOccurred variable is set to True. To get more details on the error, use ErrorInfo with the errMessage constant.
<Session>: emailIMAPSession variable
Name of the emailIMAPSession variable corresponding to the email session to use.
<Option>: Optional Integer constant (or combination of constants)
  • the type of list to perform:
    LstFolderAllList of all folders.
    LstFolderNormalList of folders containing emails only ("In-box", "Elements sent", ...).
  • the sort mode of the list:
    LstFolderSortedList sorted in alphabetical order.
  • the display of the folder type:
    LstFolderTypeReturns the type and name of folders (option not supported by the IMAP protocol)
By default, all folders containing emails are listed. This list is not sorted in alphabetical order and it contains the name of each folder only.
Component: wd290com.dll
Minimum version required
  • Version 24
This page is also available for…
Click [Add] to post a comment

Last update: 06/21/2023

Send a report | Local help