Click or drag to resize

CPop.DeleteMail Method

X#
Delete specified mail from a remote POP server.

Namespace:  VO
Assembly:  VOInternetClasses (in VOInternetClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD DeleteMail(
	nMail
) AS USUAL CLIPPER
Request Example View Source

Parameters

nMail (Optional)
Type: Usual
The number of the e-mail message to be deleted from the queue.

Return Value

Type: Usual
TRUE if successful; otherwise, FALSE.
Remarks
This method removes the specified e-mail message from a remote POP server.
Examples
The following function collects all waiting e-mail messages and deletes them from the remote POP server:
X#
 1FUNC POPGetMails (cServerIP  AS STRING,;
 2cUser      AS STRING,;
 3cPassW     AS STRING,;
 4lDelete    AS LOGIC ) AS ARRAY ;
 5PASCAL
 6LOCAL oPop  AS CPop
 7LOCAL aRet  AS ARRAY
 8LOCAL i,n   AS INT
 9oPop := CPop{cServerIP}
10IF oPop:Logon(cUser, cPassW)
11oPop:GetStatus()
12n    := oPop:MailCount
13aRet := oPop:ListMail()
14IF lDelete
15// Deleting all messages
16FOR i := 1 TO n
17oPop:DeleteMail(i)
18NEXT
19ENDIF
20ENDIF
21oPop:Disconnect()
22RETURN aRet
See Also