Skip to main content

Parse message

Anatomy

<mail:parse var="var">
string
</mail:parse>

Description: MAIL:PARSE parses the raw format of an e-mail message according to RFC 2822.

MAIL:PARSE returns an array comprised of the following items:

KeyDescription
dateDate (Unix timestamp)
subjectSubject
senderSender
sender_emailE-mail address of sender
sender_nameName of sender
toRecipients
to_emailE-mail address of first recipient
to_nameName of first recipient
to_countTotal number of recipients
ccRecipients of carbon copy
bccRecipients of blind carbon copy
messageidMessage ID
referenceidIn-reply-to message ID
receiptReceipt flag
autoreplyAutoreply flag
spamSpam flag
contenttypeContent type
textText part *
htmlHTML part *
attachmentsAttachment parts *
simpletextSimple text
simpleattachmentsSimple attachments
  • Each part is an array comprised of the following items:
KeyDescription
contenttypeContent type
encodingContent transfer encoding
charsetCharacter set
boundaryBoundary delimiter
dispositionContent disposition
filenameFilename
contentidContent ID
rawheaderRaw header
rawbodyRaw body

Attributes

NameTypeDescriptionDefined By
varvarResult variable name mail:parse

Results:

BindingTypePredicate
vararrayno-result-propagation