TargetName Property


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

This value can only be used with Kerberos authentication. If an empty string, it's autodetected as "SMTP/<server name>" (which is suitable in most cases). However, IIS SMTP server requires this name to be "SmtpSvc/<server name>" so you may need to set it manually.

To learn SPN of your server, you may use "SetSpn -L server_name" in the command-line of your server if it has SetSpn tool installed.


Value Type: String
Parameters: None 

Usage example:

Dim Mailer
'Using visual basic to create object
Set Mailer = CreateObject("MailBee.SMTP")
'Using ASP to create object
'Set Mailer = Server.CreateObject("MailBee.SMTP")
'In ASP use Response.Write instead of MsgBox
Mailer.LicenseKey = "put your license key here"
Mailer.ServerName = "host.com"
Mailer.TargetName = "SmtpSvc/host.com"
Mailer.AuthMethod = 7 ' Authenticate with Kerberos
Mailer.UserName = "MyName"
Mailer.Password = "MyPassword"
Mailer.AuthMethod = 1 ' Using PLAIN authentication method supported by most SMTP servers
Mailer.Connect
If Mailer.Connected Then
  MsgBox "Connected using PLAIN authentication method"
  Mailer.Disconnect
End If

See Also:

Password Property
AuthMethod Property
ServerName Property
Connect Method


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