4D v13.2

MSG_Extract

Home

 
4D v13.2
MSG_Extract

MSG_Extract 


 

MSG_Extract ( fileName ; decode ; attachmentPath ; enclosureList ) -> Function result 
Parameter Type   Description
fileName  Text in Filename (path defaults to message folder)
decode  Integer in 0 = No decoding, 1 = Decode if possible
attachmentPath  Text in FolderPath (path defaults to attachment folder)
enclosureList  String array in Enclosure filenames w/o FolderPath
Function result  Integer in Error Code

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.

 
PROPERTIES 

Product: 4D
Theme: IC Downloaded Mail
Number: 88949

 
INDEX

Alphabetical list of commands

 
HISTORY 

Modified: 4D Internet Commands 6.8.1

 
SEE ALSO 

MSG_SetPrefs
POP3_SetPrefs