CPop.GetMail Method | |
Read specified mail from a remote POP server.
Namespace:
VO
Assembly:
VOInternetClasses (in VOInternetClasses.dll) Version: 2.19
Syntax VIRTUAL METHOD GetMail(
nMail
) AS USUAL CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public virtual Usual GetMail(
Usual nMail = default
)
Request Example
View SourceParameters
- nMail (Optional)
- Type: Usual
The number of the e-mail message to be read from the queue.
Return Value
Type:
Usual
TRUE if successful; otherwise, FALSE.
Remarks
This method reads the specified e-mail message from a remote POP server and decodes it into its MailHeader, MailBody, and Attachment parts.
Examples
The following function reads the specified e-mail messages from a remote POP server:
1FUNC POPReadMail (cServerIP AS STRING,;
2cUser AS STRING,;
3cPassW AS STRING,;
4nMail AS INT ) AS ARRAY ;
5PASCAL
6LOCAL oPop AS CPop
7LOCAL aRet AS ARRAY
8LOCAL n AS INT
9oPop := CPop{cServerIP}
10IF oPop:Logon(cUser, cPassW)
11oPop:GetStatus()
12n := oPop:MailCount
13IF nMail <= n
14IF oPop:GetMail(nMail)
15aRet := ArrayCreate(3)
16aRet[1] := oPop:MailHeader
17aRet[2] := oPop:MailBody
18aRet[3] := oPop:Attachment
19ENDIF
20ENDIF
21ENDIF
22oPop:Disconnect()
23RETURN aRet
See Also