File 'net/mail/message.tcl' (part of 'Pool_Net')


Home | Packages | Files | Procedures | Classes | Keywords | External packages


Written by
Andreas Kupries
Description
Mail manipulation functionality, from the simple to the arcane (not yet?)
Depends on
Tcl
Keywords
Mail manipulation, Header manipulation, RFC 821, RFC 822

::pool::mail::address (text)

Extracts a valid rfc821 address from text. Copied from 'Exmh/lib/msgShow.tcl' (copyright: Brent Welch)
Argument: textThe string to search for a mail address
Returns: Hopefully a valid mail address.

::pool::mail::addressB (text default)

see RFC 821 on mail messages originally copied from 'Exmh/lib/msgShow.tcl'. Added comments and default argument. A variant of ::pool::mail::address, returns the default if no address could be recognized.
Argument: textText check for an embedded email address.
Argument: default (= {})value to use if no address was extractable.
Returns: The email address embedded in text or the default.

::pool::mail::addresses (text)

Extracts a list of address from text. They must be separated by ,
Argument: textThe string to search for a mail addresses
Returns: Hopefully a list of valid mail addresses.

::pool::mail::analyse (message)

Transforms the whole message into a form suitable for 'array set'. The body is stored as pseudo header 'x-body:'.
Argument: messageString containing the message to be analysed.
Returns: Returns a list of header keywords and associated contents.

::pool::mail::body (message)

Extract the body of message.
Argument: messageString containing the message to be analysed.
Returns: Return body of message.

::pool::mail::build (msgvar)

Takes an array containing headers and body of a message (same format as generated by ::pool::mail::analyse) and builds a message string.
Argument: msgvarName of the array variable containing the message in split form
Returns: A message suitable for transmission

::pool::mail::header (message)

Extract the headers from the message.
Argument: messageString containing the message to be analysed.
Returns: Return headers of message.

::pool::mail::headerAnalyse (header)

Transform the message header into a form suitable to 'array set'. Multiple instances of the same header are merged into one (Received:). Continuation lines are merged into a single line.
Argument: headerString containing the headers to be analysed
Returns: List suitable for 'array set', mapping header keywords to their contents. Keywords are all lowercase.

::pool::mail::invisibleRecipients (msgvar)

Retrieves the recipients of the message which are invisible to all others from the given array.
Argument: msgvarName of the array variable containing the message in split form
Returns: List of addresses

::pool::mail::recipients (msgvar)

Retrieves the recipients of the message from the given array.
Argument: msgvarName of the array variable containing the message in split form
Returns: Mail addresses of the recipients.

::pool::mail::sender (msgvar)

Retrieves the sender of the message from the given array.
Argument: msgvarName of the array variable containing the message in split form
Returns: Mail address of sender.


Generated by AutoDoc 2.1 at 02/20/1999, invoked by Andreas Kupries