ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / Managing emails
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Returns the list of folders:
  • for an IMAP session.
  • WINDEV found in the Outlook messaging software.
    Reminder: This function cannot be used to list the folders found in the Outlook Express messaging software.
MySession is emailIMAPSession
...
// List of folders
FolderList = EmailListFolder(MySession, 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 +...
WINDEV
// Start the session
SessionID = EmailStartOutlookSession("MyProfile")
...
// List of folders
FolderList = EmailListFolder(SessionID)
// FolderList contains for example:
// "Personal folders" + CR + ...
// "Personal folders\Inbox" + CR + ...
// "Personal folders\Inbox\Work" + CR + ...
// "Personal Folders\Inbox\Personal" + CR + ...
Syntax
<Result> = EmailListFolder(<Session> [, <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 +...
LstFolderNormal
(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 +...
Where:
<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>: Character string, integer, or emailOutlookSession or emailIMAPSession variable
Identifier of current email session. This identifier can be:
<Option>: Optional Integer constant (or combination of constants)
Indicates:
  • 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.
Remarks
To handle:
Component: wd290com.dll
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/30/2023

Send a report | Local help