MSG_Extract

4D - Documentation   Français   English   German   Japanese   4D Internet Commands, Theme List   4D Internet Commands, Alphabetical List   Back   Previous   Next

version 6.8.1 (Modified)


MSG_Extract (fileName; decode; attachmentPath; enclosureList) Integer

ParameterTypeDescription
fileNameTextFilename (path defaults to message folder)
decodeInteger0 = No decoding, 1 = Decode if possible
attachmentPathTextFolderPath (path defaults to attachment folder)
enclosureListStr | Txt ArrayEnclosure filenames w/o FolderPath
Function resultIntegerError Code

Description

The MSG_Extract command extracts all attachments and puts them into the attachments folder.

fileName is the name of the file or the full path of the file of which to extract the attachments. If only a filename is given, the path will default to the folder set by POP3_SetPrefs or MSG_SetPrefs (see Compatibility note). If no folder has been specified, the path will default to the folder containing the structure of the database (with 4D single-user) or to the 4D Client folder (with 4D Server).

decode is an integer specifying whether to attempt to decode the attachment. A value of zero indicates no attempt should be made to decode the attachment(s). A value of 1 will attempt to decode the file if it has been encoded in one of the following ways: Binhex, AppleSingle, AppleDouble, or Base64.

attachmentPath is the FolderPath of where to save the attachment. If no FolderPath is specified, the file will be saved in the attachments folder as specified in POP3_SetPrefs or MSG_SetPrefs (see Compatibility note). If no FolderPath has been specified, the attachment will be saved in the same folder as the database structure.

Compatibility note (version 6.8.1): If the MSG_SetPrefs command is not used, the POP3_SetPrefs msgFolder and attachmentPath parameters are used; if MSG_SetPrefs is used, the POP3_SetPrefs msgFolder and attachmentPath parameters are ignored.

enclosureList is a text/string array which is returned containing the file names of each attachment. Only the document name will be returned in each array element, not the full pathname.

See Also

MSG_SetPrefs, POP3_SetPrefs.


4D - Documentation   Français   English   German   Japanese   4D Internet Commands, Theme List   4D Internet Commands, Alphabetical List   Back   Previous   Next