Sendmail_with_starttlsmodule Context_with_tls : sig ... endmodule type VALUE = sig ... endmodule Value : sig ... endmodule type S = sig ... endmodule Make_with_tls
(Value : VALUE) :
S
with type 'x send = 'x Value.send
and type 'x recv = 'x Value.recv
and type value_error = Value.error
and type encoder = Context_with_tls.encoder
and type decoder = Context_with_tls.decodertype domain = Colombe.Domain.ttype reverse_path = Colombe.Reverse_path.ttype forward_path = Colombe.Forward_path.ttype mechanism = Sendmail.mechanismtype authentication = Sendmail.authenticationtype ('a, 's) stream = ('a, 's) Sendmail.streamtype error = [ | `Protocol of
[ Value.error
| `Tls_alert of Tls.Packet.alert_type
| `Tls_failure of Tls.Engine.failure
| `Tls_closed ]| `Unsupported_mechanism| `Encryption_required| `Weak_mechanism| `Authentication_rejected| `Authentication_failed| `Authentication_required| `Temporary_failure of tmp_error ]val pp_error : error Fmt.tval sendmail :
's Colombe.Sigs.impl ->
('flow, 's) Colombe.Sigs.rdwr ->
'flow ->
Context_with_tls.t ->
Tls.Config.client ->
?authentication:authentication ->
domain:Colombe.Domain.t ->
reverse_path ->
forward_path list ->
(string * int * int, 's) stream ->
((unit, error) Stdlib.result, 's) Colombe.Sigs.iosendmail impl rdwr flow ctx tls_config ?authentication ~domain sender
recipients mail where:
impl is the scheduler (unix, lwt or async)rdwr read/write syscallflow witness of the flow (can be a socket)ctx context used by the processtls_config TLS configuration used by STARTTLSauthentication authentication information used by the processsender sender of the mailrecipients recipients of the mailmail stream of the mailThis process try to send a mail according RFC4409. It ensures to use STARTTLS (eg. RFC3207) while the process according TLS configuration tls_config. If authentication is given, it does the authentication only while TLS flow. Mail is sended only while TLS flow.
The stream mail must respects same assumptions as Sendmail_lwt.sendmail.