class client :Netchannels.in_obj_channel -> Netchannels.out_obj_channel ->object..end
method helo : ?host:string -> unit -> string listSends an EHLO command to the server. The optional argument ?host
defaults to the default hostname of the machine. This function returns
the ESMTP lines returned by the server.
If EHLO is not supported, the method automatically falls back to HELO.
EHLO is specified in RFC 1869.
method helo_response : string listThe response from the last HELO or EHLO
method auth : Netsys_sasl.sasl_mechanism ->
string ->
string -> Netsys_sasl.credentials -> (string * string * bool) list -> unitauth mech user authz creds params:
Performs a SASL authentication using the AUTH command. See
Netsys_sasl.Client.create_session for details.
Example:
client # auth
(module Netmech_digest_sasl.DIGEST_MD5)
"user"
""
[ "password", "sEcReT", [] ]
[]
method authenticated : boolWhether the auth command ran successfully
method mail : string -> unitPerforms a MAIL FROM command. The string argument is the mail address
(without < >) of the sender.
method rcpt : string -> unitPerforms 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
method data : Netchannels.in_obj_channel -> unitThis method really send the mail.
Do not issue that command without having used mail once, and at least
rcpt once too
method rset : unit -> unitReset the current transaction
method expn : string -> string list optionExpand command : expn list will try to expand the Mailing list
list. If the list cannot be Expanded (reply 252) then None is
returned.
method help : unit -> string listPerforms the Help command. Returns the server multiline answer.
method noop : unit -> unitNOOP : does nothing, keeps the connection alive.
method quit : unit -> unitRequests the server to end this session.
method close : unit -> unitCloses the file descriptors
method starttls : peer_name:string option -> Netsys_crypto_types.tls_config -> unitSends STARTTLS, and negotiates a secure connection. This should only be done after EHLO, and only if "STARTTLS" is among the returned strings.
STARTTLS is specified in RFC 3207.
Note that it is meaningful to submit EHLO again after STARTTLS, as the server may now enable more options.
method command : string -> int * string listSends this command, and returns the status code and the status texts.
method tls_endpoint : Netsys_crypto_types.tls_endpoint optionReturns the TLS endpoint (after STARTTLS)
method tls_session_props : Nettls_support.tls_session_props optionReturns the TLS session properties (after STARTTLS)
method gssapi_props : Netsys_gssapi.client_props optionReturns GSSAPI properties, if available