Domain Property


This property may optionally be set to domain name of email address of the sender (such as "host.com"). If this property is not specified, the domain is obtained by scanning FromAddr property (e.g. if FromAddr="joe@server.com", "server.com" would be used as a domain). If FromAddr property is empty or does not contain domain name then host name of the machine where MailBee is running will be used.

This property is used in SMTP HELO (or EHLO for advanced authentication) command to initiate authentication of the sender. Authentication takes place in Connect method, so you must set value of Domain property before calling this method.


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 = "mail.server.com"
Mailer.Domain = "allmighty_sender"
Mailer.Message.ToAddr = "bill@yoursite.com"
Mailer.Message.FromAddr = "joe@mysite.com"
Mailer.Message.Subject = "Hello"
Mailer.Message.ImportBodyText "C:\docs\letter.htm", True
If Mailer.Connect Then
  Mailer.Send
  Mailer.Disconnect
Else
  MsgBox Mailer.ErrDesc
End If

See Also:

Connect Method
AuthMethod Property
Message Property
Message.FromAddr Property


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