Connect Method
Connects to the POP3 server and logs in the specified
user account.
Make sure to set the following properties before calling this method:
| blnResult = ObjectName.Connect([ServerName], [PortNumber], [UserName], [Password], [UserDomain], [TargetName]) | ||
| Parameters: | ||
| ServerName As String | (optional) If specified, will set POP3.ServerName property with new value | |
| PortNumber As Long | (optional) If specified, will set POP3.PortNumber property with new value | |
| UserName As String | (optional) If specified, will set POP3.UserName property with new value | |
| Password As String | (optional) If specified, will set POP3.Password property with new value | |
| UserDomain As String | (optional) The user domain name (only used with NTLM and Kerberos). If not specified, current UserDomain value will be used | |
| TargetName As String | (optional) The SPN (only used with Kerberos). If not specified, current TargetName value will be used | |
| Return value As Boolean | True if successful, False if connect procedure failed (mail server is not responding, username and/or password is incorrect, authentication method is not supported, license key is invalid). You can check ErrDesc property or log file to get more detailed error information | |
Usage example:
Dim Mailer 'Using visual basic to create object Set Mailer = CreateObject("MailBee.POP3") 'Using ASP to create object 'Set Mailer = Server.CreateObject("MailBee.POP3") 'In ASP use Response.Write instead of MsgBox Mailer.LicenseKey = "put your license key here" ' Connect using default (110) PortNumber If Mailer.Connect("mailserver.com", ,"MyName", "MyPassword") Then MsgBox "Connected successfully" Mailer.Disconnect Else MsgBox Mailer.ErrDesc End If
See Also:
ServerName Property
PortNumber Property
UserName Property
Password Property
AuthMethod Property
Disconnect Method
Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.