SMTPSocket
Class SMTPSocket

PropertyDescription
Sub Address( Assigns newValue As String )set the hostname or IP address of the remote server
Function Address() As Stringget the hostname or IP address of the remote server

Sub Constructor()initialize with default options

Sub DeleteAllMessages()remove all EmailMessages from queue

Property Messages() As EmailMessagean array of EmailMessages in the queue

Function FailedMessages() As EmailMessage()get an array of EmailMessages that failed to send

Sub Password( Assigns newValue As String )set the password (when using authenication)
Function Password() As Stringget the password (when using authentication)

Sub Port( Assigns newValue As Integer )set the port to be used for connection
Function Port() As Integerget the port to be used for connection

Function SendMail() As Booleanconnect to the remote server and send all EmailMessages in the queue

Function SentMessages() As EmailMessage() get an array of EmailMessages that were sent

Sub Timeout( Assigns newValue As Integer )set the timeout (in seconds). The maximum is 30 seconds.
Function Timeout() As Integerget the timeout (in seconds). The default is 20 seconds.
Sub UserName( Assigns newValue As String )set the username (when using authentication)
Function UserName() As Stringget the username (when using authentication)



The SMTPSocket class is used for sending email. When using authentication, be sure to set the username and password. SMTPSocket contains an array of EmailMessages in a queue. Calling the function SendMail will connection SMTPSocket to the remote server and attempt to send all EmailMessages currently in the queue.