LassoScript Utility
Basics Browse Detail

[Email_Parse]

Tag Link [Email_Parse] 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_Parse] parses a raw email message. The tag requires one parameter which is the raw text of an email message. The message is parsed into headers and body parts (attachments). The various member tags of [Email_Parse] can be used to inspect the message.

The headers of the message can be inspected with [Email_Parse->Headers] or an individual header value can be viewed with [Email_Parse->(Header: 'Name')]. Additional tags allow important headers to be viewed directly including [Email_Parse->To], [Email_Parse->From], [Email_Parse->Subject], [Email_Parse->Date], [Email_Parse->Content_Type], [Email_Parse->Content_Transfer_Encoding], and [Email_Parse->Content_Disposition].

The default body of the message can be retrieved using [Email_Parse->Body]. This returns the first body part that is a text type. It returns plaintext by default, then html text or enriched text. If no text part can be found then the first part of any type is returned.

The individual parts of the message can be inspected using [Email_Parse->Size] to see how many parts there are and [Email_Parse->Get] to get an individual part. Each part returned will be an [Email_Parse] object that might have its own headers and sub-parts.

Syntax

[Email_Parse: 'Raw Message']

Parameters

Required Parameters
String The raw source of an email message.

Examples

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