From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As EmailMessage() )
aSMTPSecureSocket.Messages = newEmailMessage()Value
EmailMessage()Value = aSMTPSecureSocket.Messages

Supported for all project types and targets.

The queue of messages that are waiting to be sent.


This is an array of which the 0th element is the next message to be sent. When a message is sent, it is removed from the queue and passed to the MessageSent event. To add a message to the queue, use the Arrays.AddRow method. To remove a message, use the Arrays.RemoveRowAt method.

Sample Code

Send a simple email:

Var mail As EmailMessage

// set up the socket
Socket1.Address = ""
Socket1.Port = 25

Socket1.UserName = "<username>"
Socket1.Password = "<password>"

// populate the email message
mail = New EmailMessage
mail.FromAddress = ""
mail.Subject = "My Subject"
mail.BodyPlainText = "Hello!"
mail.Headers.AppendHeader("X-Mailer","SMTP Test")

// send the email