Back to product page

SendMessage Method


Sends email message to the server.

Syntax

  • Basic
object.SendMessage()
The SendMessage(object) syntax has these parts:
objectAn expression evaluating to an object of type wodSmtp

Remarks

This method will initiate sending the message to the SMTP server. It can be used after you have set up message contents.

Connected to the server using Connect method, SendMessage will establish the connection for you, and in that case it will automatically call Disconnect method to after the message is delivered. If Connect method was manually called, wodSmtp will not disconnect, so you can call Reset method and send new message to the same server.

If you haven't set Hostname property (to define Smarthost SMTP server), SendMessage will first get domain out of MailTo property value, resolve it to find default mail exchanger records, and fill Hostname property with that value.

Platforms

Windows