TargetName Property


The service principal name (SPN) of the IMAP4 server.

This value can only be used with Kerberos authentication. If an empty string, it's autodetected as "IMAP/<server name>" (which is suitable in most cases).

Note: This value (if not specified in Connect method parameters) must be set BEFORE calling Connect method.


Value Type: String
Parameters: None 

Usage example:

Dim Mailer
'Using visual basic to create object
Set Mailer = CreateObject("MailBee.IMAP4")
'Using ASP to create object
'Set Mailer = Server.CreateObject("MailBee.IMAP4")
'In ASP use Response.Write instead of MsgBox
Mailer.LicenseKey = "put your license key here"
Mailer.ServerName = "imap.host.com"
Mailer.TargetName = "IMAP4/host.com"
Mailer.AuthMethod = 5 ' Authenticate with Kerberos
Mailer.UserName = "bill"
Mailer.Password = "bill's password"
If Mailer.Connect Then ' Connect to bill@host.com account
  MsgBox "Connected successfully"
  Mailer.Disconnect
End If

See Also:

Connect Method

Password Property
ServerName Property


Copyright © 2002-2022, AfterLogic Corporation. All rights reserved.