4D Internet Commands v16IMAP_Download |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D Internet Commands v16
IMAP_Download
IMAP_Download
The IMAP_Download command is designed to retrieve a message from an IMAP server by downloading it to a disk-based file. Any IMAP message which contains attachments or whose size is greater than 32K should be downloaded with this command. File attachments can only be extracted from the messages retrieved in this way. imap_ID is a long integer reference to an open connection created with IMAP_Login. msgNum is a long integer value indicating which message in the mailbox to retrieve. msgNum represents the position of a message within the current list of messages. You cannot rely on the msgNum remaining the same for a specific e-mail item from session to session. headerOnly is an integer value which denotes whether to retrieve the entire contents of the message or just the header information. fileName contains the name of the file and the optional path where you would like the message saved. This value may be specified in three different ways:
In the first two cases, if no folder has been specified by IMAP_SetPrefs, the message will be saved in the same folder as the structure of the database (with 4D single-user) or in the 4D Client folder (with 4D Server). After the file has been saved to the disk, the final name of the file will be returned to the variable passed as the fileName parameter. If you attempt to call IMAP_Download with a fileName that already exists within the download folder, the name will be numerically incremented and its new value as saved to the disk will be returned to the fileName variable. updateSeen is an integer value that indicates if the \Seen flag must be added to the message flags list, whether implicitly or not. This parameter is optional and a default value is used if this parameter is not passed:
Default value is set to 0 which implicitly means add \Seen flag.
See also
|
PROPERTIES
Product: 4D Internet Commands
HISTORY
Created: 4D Internet Commands 6.8.1 ARTICLE USAGE
4D Internet Commands ( 4D Internet Commands v16) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||