4D v13.2

MSG_FindHeader

Home

 
4D v13.2
MSG_FindHeader

MSG_FindHeader 


 

MSG_FindHeader ( fileName ; headerLabel ; headerValue ) -> Function result 
Parameter Type   Description
fileName  Text in Filename (path defaults to message folder)
headerLabel  String in Header label ("From:", "To:", "Subject:", etc.)
headerValue  Text in Value
Function result  Integer in Error Code

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.

 
PROPERTIES 

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

 
INDEX

Alphabetical list of commands

 
HISTORY 

Modified: 4D Internet Commands 6.8.1

 
SEE ALSO 

IMAP_Download
MSG_Charset
MSG_SetPrefs
POP3_Charset
POP3_DownLoad
POP3_SetPrefs