Section Intro: Network Appendix
Meta-HTML contains several core functions for manipulating network
streams, such as
Given a complete RFC-822 E-mail message stored in MSGVAR, this function returns an alist describing the message in detail.
The elements of the alist include the raw headers, and variables called HDR_TO, HDR_FROM, HDR_SUBJECT, HDR_CC, and HDR_DATE, in additions to the variable BODY.
Send the mail message MESSAGE using a network stream from FROM to TO.
The host used to connect to for SMTP defaults to the value of the variable E-MAIL::MAILHOST, or "localhost" if that variable is not defined.
TO, CC, BCC and HEADERS are arrays containing elements of the indicated type.
<e-mail::sendmail firstname.lastname@example.org email@example.com "" "" "Subject: Testing e-mail::sendmail Reply-to: firstname.lastname@example.org" "This is the body of the message.">
If the variable E-MAIL::DEBUG-SENDMAIL-SESSION is non-empty, it says to populate the array e-mail::sendmail-session with the conversation that takes place between Meta-HTML and the SMTP server at E-MAIL::MAILHOST.
Get an HTTP document specified by HOST, PORT and PATH.
If a redirection is necessary in order to get the final
document, the variable
If the document could not be retrieved, the variable
If STRIP-HEADERS is given, the HTTP protocol headers are stripped from the document before it is returned.
If the keyword argument VAR is supplied, it is the name of variable that should receive the contents of the HTTP document verbatim -- by necessity, this variable is binary. You can use the CONTENT-LENGTH function to find out the length of the retrieved document.
Finally, any extra headers that you would like to pass along may be written into the call, perhaps to set a cookie for example.
<http::get-document www.metahtml.com 80 "/" "Cookie: SID=829389834">
Return the hostname and port portion of the fully qualified URL.
Include the contents of the Web document referenced by URL in the page. If VARNAME is supplied, it is the name of a binary variable which will receive the page contents. Otherwise, the document is simply returned.
EXTRA-HEADERS can be supplied, perhaps to pass a cookie to the server:
<http::include http://www.foo.com/cgi-bin/foo.exe "Cookie: SID=10">
Return the path portion of the fully qualified URL. This is the part of URL that is meaningful to the host.
Return the port portion of the fully qualified URL. If the URL doesn't have a port specifier, the value "80" is returned.
POST the variables and values in PACK to the server and page specified by URL. If the keyword argument USER-AGENT is supplied, it overides the default value, which is either the value of ENV::HTTP_USER_AGENT, or the string Mozilla/4.04 [en] (X11; I; Linux 2.0.27 i686).
Return the query portion of the fully qualified URL.
If URL doesn't have a query string, the empty string
is returned, otherwise, that portion of URL following the
first question-mark (
The META-HTML Reference Manual V2.0 Copyright © 1995, 1998, Brian J. Fox
Found a bug? Send mail to email@example.com