Ocamlnet 3 Reference Manual : Netsmtp.client

# Class Netsmtp.client

    class client : Netchannels.in_obj_channel -> Netchannels.out_obj_channel -> object .. end

    method helo : ?host:string -> unit -> string list

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.

    method mail : string -> unit

Performs a MAIL FROM command. the `string` argument is the mail address (without < >) that sends the mail.

    method rcpt : string -> unit

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

    method data : Netchannels.in_obj_channel -> unit

This method really send the mail. Do not issue that command without having used `mail` once, and at least `rcpt` once too

    method rset : unit -> unit

Reset the current transaction

    method expn : string -> string list option

Expand 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 list

Performs the Help command. Returns the server multiline answer.

    method noop : unit -> unit

NOOP : does nothing, keeps the connection alive.

    method quit : unit -> unit

Requests the server to end this session.