Troubleshooting: POP3
Common reason of e-mail account login problems or the messages not being received is one of the following:
- POP3 user name ( UserName property of POP3 object) is different from account name (or from e-mail address).
- Some POP3 servers expect user name in form of "account_name" while others - "account_name@domain.com". Sometimes, user name is not related with either account name or e-mail address. Contact your e-mail server administration for details
- POP3 mailbox is locked. If someone else is already connected to the mailbox, noone else can establish connection to the same mailbox
- POP3 server configuration (domains, MX records, etc.) is incorrect. Check your server's documentation for details
You can find out exact reason of the problem from MailBee's log file. To enable logging, set EnableLogging and LogFilePath properties of POP3 object.
If the problem persists, don't hesitate to contact our AfterLogic Support Team to get prompt and helpful reply. It's all free!
This sample connects to the POP3 server transmitting password as clear text, and then completely retrieves first message in the mailbox (if any). POP3 session log is written into C:\pop3_log.txt file. All possible errors are handled.
Dim objPOP3, objMsg
' Create POP3 object
Set objPOP3 = CreateObject("MailBee.POP3")
' Enable logging POP3 session into a file
objPOP3.EnableLogging = True
objPOP3.LogFilePath = "C:\pop3_log.txt"
' Unlock POP3 object
objPOP3.LicenseKey = "put your license key here"
' Set POP3 server name
objPOP3.ServerName = "mail.server.com"
' Set user credentials
objPOP3.UserName = "username"
objPOP3.Password = "password"
' Connect to the server and log in the mailbox
If objPOP3.Connect Then
' Download first message completely
Set objMsg = objPOP3.RetrieveSingleMessage(1)
If Not objPOP3.IsError Then
' Display message body
MsgBox objMsg.BodyText
Else
' Display error information
MsgBox "Error #" & objPOP3.ErrCode & ", " & objPOP3.ErrDesc
End If
' Close the connection
objPOP3.Disconnect
Else
' Display error information
MsgBox "Error #" & objPOP3.ErrCode
MsgBox "Server response: " & objPOP3.ServerResponse
End If
<%
Dim objPOP3, objMsg
' Create POP3 object
Set objPOP3 = Server.CreateObject("MailBee.POP3")
' Enable logging POP3 session into a file
objPOP3.EnableLogging = True
objPOP3.LogFilePath = "C:\pop3_log.txt"
' Unlock POP3 object
objPOP3.LicenseKey = "put your license key here"
' Set POP3 server name
objPOP3.ServerName = "mail.server.com"
' Set user credentials
objPOP3.UserName = "username"
objPOP3.Password = "password"
' Connect to the server and log in the mailbox
If objPOP3.Connect Then
' Download first message completely
Set objMsg = objPOP3.RetrieveSingleMessage(1)
If Not objPOP3.IsError Then
' Display message body
Response.Write objMsg.BodyText
Else
' Display error information
Response.Write "Error #" & objPOP3.ErrCode & ", " & objPOP3.ErrDesc
End If
' 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:
ErrCode Property
ErrDesc Property
ServerResponse Property