MSG_FindHeader

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_FindHeader (fileName; headerLabel; headerValue) Integer

ParameterTypeDescription
fileNameTextFilename (path defaults to message folder)
headerLabelStringHeader label ("From:", "To:", "Subject:", etc.)
headerValueTextValue
Function resultIntegerError Code

Description

Given the fileName of a message document retrieved to disk by the POP3_Download or IMAP_Download command, the MSG_FindHeader command will search the header section for headerLabel and return the value assigned to the field into headerValue.

fileName is the name of the file or the full path of the file of which to extract the header information. 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 by POP3_SetPrefs, 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).

Compatibility note (version 6.8.1): If the MSG_SetPrefs command is not used, the POP3_SetPrefs msgFolder parameter will be used; if MSG_SetPrefs is used, the POP3_SetPrefs msgFolder parameter is ignored.

headerLabel is a string containing the name of any header label. The headerLabel can reference any defined, user-defined or extended header such as "From:", "To:", "X-MyHeader", etc.

headerValue is a text variable where the command will return the value assigned to the specified header field. Since the headerValue parameter can include extended characters, you can automate their management using the POP3_Charset or MSG_Charset command.

Compatibility note (version 6.8.1): If the MSG_Charset command is not used, the POP3_Charset bodyCharset parameter will be used; if MSG_Charset is used, the POP3_Charset bodyCharset parameter is ignored.

See Also

IMAP_Download, MSG_Charset, MSG_SetPrefs, POP3_Charset, POP3_DownLoad, POP3_SetPrefs.


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