Topic: APLX Help : System Classes : Properties : header
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

The 'header' property


Read-only, Character Vector

Valid for: GetMail

The header property returns the raw header of an e-mail. It is valid only after you have called the GetMessage (or GetSummary) method to retrieve an e-mail from the POP3 server. It is formatted as a character vector, with embedded carriage return (⎕R) characters separating lines. You can conveniently use ⎕BOX to convert this to a matrix.

An e-mail header comprises a keyword, ending in a colon, followed by a text string which is the value associated with the keyword. This can continue on successive lines. For example:

      MailObj.GetMessage 1
      MailObj.header
Return-path: <bounce_204417_131880@b2.mx0.net>
Received: from pop3.isp.net by mailstore
 for microapl@microapl.co.uk id 1CpOoK-00055Z-BL;
 Fri, 14 Jan 2005 10:36:08 +0000
Message-Id: <d1to1.204417.131880@m2.mx0.net>
Date: Fri, 14 Jan 2005 10:31:00 +0000
From: "VSJ" <VSJ-204417-131880z@m2.mx0.net>
To: microapl@microapl.co.uk
Subject: VSJ Developer Newswire - 14th Jan 2005
List-Owner: <mailto:abuse@mx0.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit

APLX automatically extracts the most important of these header fields into specific properties of the GetMail object such as subject, date, to and from. However, sometimes you may want to examine the full header to extract more information, such as the path by which the e-mail reached your mailbox (held in a series of one or more 'Received:' fields).


Topic: APLX Help : System Classes : Properties : header
[ Previous | Next | Contents | Index | APL Home ]