- 製 品
- 購 入
Order Online Maintenance Renewal Resellers - サポート
Helpdesk オンラインドキュメント(英語) Webフォーラム(英語) - Our Clients
- 当社について
About as サービス Contact
Back to Tutorials list
MessageCount Property
Back to Tutorials list
Learning the number of messages
The sample prints the number of messages in the mailbox.
MessageCount is a key property of this sample.
[Visual Basic]:
Dim objPOP3
' Create POP3 object
Set objPOP3 = CreateObject("MailBee.POP3")
' Unlock POP3 object
objPOP3.LicenseKey = "put your license key here"
' Set POP3 server name
objPOP3.ServerName = "mail.server.com"
' Force APOP authentication
objPOP3.AuthMethod = 1
' Set user credentials
objPOP3.UserName = "username"
objPOP3.Password = "password"
' Connect to the server and log in the mailbox
If objPOP3.Connect Then
' Display the number of messages
MsgBox objPOP3.MessageCount & " messages"
' Close the connection
objPOP3.Disconnect
Else
' Display error information
MsgBox "Error #" & objPOP3.ErrCode
MsgBox "Server response: " & objPOP3.ServerResponse
End If
[ASP]:
<%
Dim objPOP3
' Create POP3 object
Set objPOP3 = Server.CreateObject("MailBee.POP3")
' Unlock POP3 object
objPOP3.LicenseKey = "put your license key here"
' Set POP3 server name
objPOP3.ServerName = "mail.server.com"
' Force APOP authentication
objPOP3.AuthMethod = 1
' Set user credentials
objPOP3.UserName = "username"
objPOP3.Password = "password"
' Connect to the server and log in the mailbox
If objPOP3.Connect Then
' Display the number of messages
Response.Write objPOP3.MessageCount & " messages"
' Close the connection
objPOP3.Disconnect
Else
' Display error information
Response.Write "Error #" & objPOP3.ErrCode & "<br>"
Response.Write "Server response: " & objPOP3.ServerResponse
End If
%>
See Also:MessageCount Property