4D Internet Commands v14

POP3_DownLoad

Home

 
4D Internet Commands v14
POP3_DownLoad

POP3_DownLoad 


 

POP3_DownLoad ( pop3_ID ; msgNumber ; headerOnly ; fileName ) -> Function result 
Parameter Type   Description
pop3_ID  Longint in Reference to a POP3 login
msgNumber  Longint in Message number
headerOnly  Integer in 0 = Entire message, 1 = Only header
fileName  Text in Local Filename
in Resulting Local Filename
Function result  Integer in Error Code

The POP3_DownLoad command is designed to retrieve a message from a POP3 server by downloading it to a disk-based file. Any POP3 message which contains attachments or whose size is greater than 32K should be downloaded with this command. Attachments to a message can only be extracted from messages retrieved in this way.

pop3_ID is a long integer reference to an open session created with POP3_Login.

msgNumber is a long integer value indicating which message in the mailbox to retrieve. The msgNumber represents the position of a message within the current list of messages. You cannot rely on the msgNumber 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 three different ways:

""= Saves the file in the folder set by POP3_SetPrefs, with the name "temp1" (if a file with the same name already exists, the filenames "temp2", "temp3", etc. will be tried until an unused file name is found)
"FileName"= Saves the file in the folder set by POP3_SetPrefs, titled fileName
"Path:FileName"= Saves the file in the path specified with the name fileName

In the first two cases, if no folder has been specified by POP3_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 disk, the final name of the file will be returned to the variable passed as the fileName parameter. If you attempt to call POP3_Download with a fileName that already exists within the download folder, the name will be numerically incremented and its new value as saved to disk will be returned to the fileName variable.

 
PROPERTIES 

Product: 4D Internet Commands
Theme: IC POP3 Review Mail
Number: 88958

 
HISTORY 

Created: 4D Internet Commands 6.5

 
SEE ALSO 

POP3_SetPrefs

 
ARTICLE USAGE

4D Internet Commands ( 4D Internet Commands v11.4)
4D Internet Commands ( 4D v13.2)
4D Internet Commands ( 4D Internet Commands v12.1)
4D Internet Commands ( 4D Internet Commands v14 R2)
4D Internet Commands ( 4D Internet Commands v14)
4D Internet Commands ( 4D Internet Commands v14 R3)
4D Internet Commands ( 4D Internet Commands v14 R4)