Tk Library Source Code

Artifact [7ee5e4854b]
Login

Artifact 7ee5e4854bcae845bd1ef599846d685696ccbb4b:

Attachment "smtp.n" to ticket [446584ffff] added by andreas_kupries 2001-09-13 07:10:55.
'\"
'\" Copyright (c) 2000 Andreas Kupries
'\" All right reserved
'\"
'\" CVS: $Id$ smtp.n
'\"
.so man.macros
.TH "smtp" n 1.2 tcllib "smtp client"
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
smtp \- Client-side tcl implementation of the smtp protocol
.SH "SYNOPSIS"
package require \fBTcl\fR
.sp
package require \fBmime ?1.0?\fR
.sp
package require \fBsmtp ?1.2?\fR
.sp
\fBsmtp::sendmessage\fR \fItoken\fR \fIoptions\fR\fR
.sp
.BE
.SH "DESCRIPTION"
.PP
The smtp library package provides the client side of the smtp protocol.
.TP
\fBsmtp::sendmessage\fR \fItoken\fR \fIoptions\fR\fR
This command sends the MIME part represented by \fItoken\fR to an SMTP
server. \fIoptions\fR is a list of options and their associated values.
The recognized options are:
.RS
.TP
\fB-servers\fR
A list of SMTP servers. The default is \fIlocalhost\fR.
.TP
\fB-ports\fR
A list of SMTP ports. The default is \fI25\fR.
.TP
\fB-queue\fR
Indicates that the SMTP server should be asked to queue the message
for later processing. A boolean value.
.TP
\fB-atleastone\fR
Indicates that the SMTP server must find at least one recipient
acceptable for the message to be sent. A boolean value.
.TP
\fB-originator\fR
A string containing an 822-style address specification. If present the
header isn't examined for an originator address.
.TP
\fB-recipients\fR
A string containing one or more 822-style address specifications. If
present the header isn't examined for recipient addresses).
.TP
\fB-header\fR
A list of keywords and their values (may occur zero or more times).
.RE
.sp
If the \fI-originator\fR option is not present, the originator
address is taken from \fBFrom\fR (or \fBResent-From\fR);
similarly, if the \fI-recipients\fR option is not present, recipient
addresses are taken from \fBTo\fR, \fBcc\fR, and \fBBcc\fR
(or \fBResent-To\fR, and so on). Note that the header key/values
supplied by the \fI-header\fR option (not those present in the MIME
part) are consulted. Regardless, header key/values are added to the
outgoing message as necessary to ensure that a valid 822-style message
is sent.
.sp
The command returns a list indicating which recipients were
unacceptable to the SMTP server. Each element of the list is another
list, containing the address, an SMTP error code, and a textual
diagnostic. Depending on the \fI-atleastone\fR option and the
intended recipients, a non-empty list may still indicate that the
message was accepted by the server.
.SH "SEE ALSO"
mime, pop3, ftp, http
.SH "KEYWORDS"
mail, email, smtp, mime, rfc821, rfc822, internet, net