[ Previous ] [ Contents ] [ Index ] [ Next ]

ns_sendmail

Overview

Send a mail message

Syntax

ns_sendmail to from subject body ?extraheaders? ?bcc?

Description

ns_sendmail sends a mail message with the specified to, from, and subject headers, and the specified body text. You can specify multiple "To:" recipients by providing a comma-separated list of email addresses in the to argument.

You can add additional headers (such as an Errors-To header) by specifying the set ID of an ns_set that contains header name and content pairs in the extraheaders argument. On error, a Tcl error is signaled.

Specify BCC recipients in the bcc argument. Separate multiple BCC recipients by commas. If you want to specify BCC recipients, you'll need to specify the extraheaders argument, too, but the extraheaders argument can be empty.

ns_sendmail uses the SMTP server specified by the MailHost parameter in the configuration file. If MailHost is not specified in the configuration file, localhost is used. You can also specify an SMTP smarterhost in the SmtpPort parameter in the configuration file.

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1996 America Online, Inc.