Message object

A Message object holds information about an email message. Use the Send method to send the email message. Use the NewMessage property to create a licensed Message object. Using the ExEMail component there are two ways to send email messages: non-blocking and blocking mode. The following sample shows how to send an email message using non=blocking mode:

Dim WithEvents e As EMail

Private Sub Form_Load()
    ' Creates an EMail object, that will receive Message notifications
    Set e = Runtime1.NewEMail()
    ' Creates a Message object
    Dim m As Message
    Set m = Runtime1.NewMessage()
    ' Message' notifications are sent through EMail object
    Set m.Notifier = e
    ' Sends a message to 2 users
    m.Send "me@malibu.com", "bula@bulat.com,robingo@calcuta.fom", "Test", "The message has one attchament", "c:\winnt\system32\setup.exe"
End Sub

The following sample sends the email message by blocking the application while it delivers the message:

Private Sub Form_Load()
    ' Creates a Message object
    Dim m As Message
    Set m = Runtime1.NewMessage()
    ' Sends a message to 2 users
    m.Send "me@malibu.com", "bula@bulat.com,robingo@calcuta.fom", "Test", "The message has one attchament", "c:\winnt\system32\setup.exe"
End Sub

Here's the list of supported properties:

NameDescription
AttachmentRetrieves or sets a value that indicates a list of files attached to the message separated by semicolon.
AuthMethodRetrieves or sets a value that indicates the authentication method.
BccRetrieves or sets a value that indicates the blind carbon copy recipient's email address(s) (separated by commas, if there are more than once).
BodyEncodingSpecifies the way the message's body is encoded.
BodyHTMLRetrieves or sets a the message's body in HTML format. The HTML content is attached as an alternative to plain text.
BodyTextRetrieves or sets the message's body as plain text.
CcRetrieves or sets a value that indicates the carbon copy recipient's email address(s) (separated by commas, if there are more than once).
DateRetrieves or sets the message's date.
DNSRetrieves the list of DNS servers.
ExtraHeaderRetrieves or sets any extra field to the message's header.
FromRetrieves or sets a value that indicates the email address of the sender.
HeloSpecifies the string being sent by HELO command to the e-mail server. As a result, the receiver-SMTP will not have to perform MX resolution on this name in order to validate the HELO parameter.
HostRetrieves or sets a value that indicates the host where the message should be delivered. If the Host is empty, the control queries the DNS where the message should be delivered.
LastErrorRetrieves the last error that occurs in delivering the message.
LogonPasswordRetrieves or sets the value that indicates the login's password.
LogonUserRetrieves or sets a value that indicates the login user name.
NotifierChanges or gets the message's object notifier. The object notifier receives all the message events.
PortRetrieves or sets the server's port.
PriorityRetrieves or sets a value that indicates the message's priority.
SendSends the email message to the recipients.
SendOnceIndicates whether the message is sent once to the mail server, for all recipients, and the server takes the responsibility to delivery the message per all assigned recipients.
SubjectRetrieves or sets a value that indicates the subject of the message.
TimeoutSpecifies the amount of time (in seconds) the control will wait for the server response.
ToRetrieves or sets a value that indicates the recipient's email address, or a list of recipient's email addresses separated by commas.