Email

The Email library allows creation of Emails directly from the Control Script component.

Email Parameters Table

Name

Type/Notes

From

string

Subject

string

Body

string

To

array of strings

CC

array of strings

Server

string

Password

string

UseSsl

string

EventHandler

function to call with status, signature is 'function( table, error ),' where 'table' is the table passed into Send and 'error' is a string (if error occurred) or nil.

Send( table )

Purpose:    Attempts to send an email using the parameters documented in the above table.

Parameter: table

Type: table

Definition: A table containing the details of the email to be sent. Documented in the table above.

Example

Email.Send

{

To = { "somebody@somecompany.com" },

From = "myemail@mycompany.com",

Subject = "the date should be correct...",

Body = "just testing email out, will this work??",

EventHandler = function(t, err)

if err then print( "ERROR", err )

else print( "ALL GOOD!" ) end

end,

Server = "smtp.mycompany.com",

Password = "XXXXXXX"

}