This is an interface for the Simple Mail Tranfer Protocol (SMTP) as specified by RFC 2821.
default TCP port for SMTP
The class client
implements the SMTP protocol. Client objects are created
by
new client in_ch out_ch
where in_ch
is an input channel representing the input direction of the
TCP stream, and where out_ch
is an output channel representing the output
direction of the TCP stream.
Sends an HELLO command to the server. the optionnal argument ?host
defaults to the default hostname of the machine. This function returns
the ESMTP lines returned by the server.
Performs a MAIL FROM command. the string
argument is the mail address
(without < >) that sends the mail.
Performs a RCPT TO command. the string
argument is one of the mail
address the mail has to be sent to. You have to use that function for
each recipient of the mail.
If the server returns a 551 error (user relocated, see RFC 2821, section 3.4), the relocated adress is silently used, and the error is not raised
This method really send the mail.
Do not issue that command without having used mail
once, and at least
rcpt
once too
Reset the current transaction
Expand command : expn list
will try to expand the Mailing list
list
. If the list cannot be Expanded (reply 252) then None
is
returned.
Performs the Help command. Returns the server multiline answer.
NOOP : does nothing, keeps the connection alive.
Requests the server to end this session.