LassoScript Utility
Basics Browse Detail

[Email_SMTP]

Tag Link [Email_SMTP] Category Email
Type Substitution Source Available Yes
Support Preferred Version 8.0
Change Unchanged Data Source Any
Output Type None Security None
Implementation LDML Sets Lasso 8.5, Lasso 8.0

Description

[Email_SMTP] is a type that represents a connection to a remote SMTP server for sending email. The type creator has no parameters. All of the work of the type is done through member tags. This type is used internally by the email sending system and is not generally called directly.

The [Email_SMTP->Open] tag take -Host, -Port, -Timeout, -Username, and -Password parameters and opens a connection to the remote server using the best available authentication method.

The [Email_SMTP->Send] tag is used to send an individual message to the SMTP server. It accepts -From, -Recipients, and -Message parameters.

The [Email_SMTP->Close] tag is used to close the SMTP connection.

Finally, the [Email_SMTP->Command] tag can be used to send a raw command to the SMTP server. The tag takes a -Send parameter that specifies the command to send. If the -Read parameter is specified then the result of the command is returned. An optional -Expect parameter specifies the expected return code from the SMTP server.

Syntax

[Var: 'SMTP' = (Email_SMTP)]
[$SMTP->(Open: -Host='smtp.example.com', -Username='JohnDoe', -Password='Example')]
[$SMTP->(Send: ...)]
[$SMTP->Close]

Parameters

No Parameters Required.

Examples

See the Lasso 8 Language Guide for examples of how to use this tag.