LassoScript Utility
Basics Browse Detail

[Email_Compose]

Tag Link [Email_Compose] 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_Compose] allows an email message to be composed. For most purposes the [Email_Send] tag itself provides enough email composition options, but the [Email_Compose] object can be used if more control is needed. The output of this tag is usually passed to [Email_Queue] or [Email_Immediate] for sending.

[Email_Compose] accepts the same parameters as [Email_Send] including -To, -From, -Subject, -Cc, -Bcc, -Sender, -ReplyTo, etc. It accepts a -Body parameter to setup a default text part and an -HTML parameter to set up a default HTML part.

The -ContentType, -CharacterSet, -TransferEncoding, -ContentDisposition, -ExtraMIMHeaders, and -Attachments can also be specified.

In addition, the type supports four tags that allow individual parts to be added to the message. [Email_Compose->AddTextPart] adds a text part to the message (accepts the text to add or a -Path parameter referencing a file to add). [Email_Compose->AddHTMLPart] adds an HTML part to the message (accepts the text to add or a -Path parameter referencing a file to add). [Email_Compose->AddAttachemnt] adds an attachment to the message (accepts the text to add or a -Path parameter referencing a file to add as well as a name parameter that specifies the name of the included file). And, [Email_Compose->AddPart] adds a generic part to the message (accepts the data of the part and a name for the part).

The type also supports four member tags that are used by the [Email_Queue] or [Email_Immediate] tags. These include [Email_Compose->Recipients], [Email_Compose->Data], [Email_Compose->From], and [Email_Compose->Summary]. These tags are not usually called directly.

Syntax

[Var: 'Msg' = (Email_Compose: ...)]
[Email_Immediate: -Data=$Msg->Data, -From=$Msg->From, -Recipients=$Msg->Recipients]

Parameters

Required Parameters
-To The email address of primary recipient of the email message.
-From The email address of the person who sent the email message.
-Subject The subject of the email message.
-Body The plain-text body of the email message.
Optional Parameters
-HTML Optional HTML part of the email message.
-Cc Optional carbon-copy recipients of the email message.
-Bcc Optional blind carbon-copy recipients of the email message.
-Date Optional date for the email message (defaults to today).
-Sender Optional sender for the email message.
-ReplyTo Optional reply-to address for the email message.
-ContentType Optional content-type for the email message.
-CharacterSet Optional character set for the email message.
-TransferEncoding Optional transfer encoding for the email message.
-ContentDisposition Optional content-disposition for the email message.
-ExtraMIMEHeaders Optional array of name/value pairs representing extra MIME headers for the email message.
-Attachments Allows a file to be attached to an email message. Accepts either a file path, a pair including a synthetic file name and the raw data of the file, or an array of file names and pairs.
-HeaderType Sets the header type to quoted-printable "Q" encoding or base64 "B" encoding. The value should be either "Q" (the default) or "B".
-HTMLImages Allows an HTML image to be embedded in the HTML part of an email message. Accepts either a file path, a pair including a synthetic file name and the raw data of the image, or an array of file names and pairs.

Examples

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