package sendmail
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ddf59cca3e06370d6a830f46829de518f29f1cfa607ab4f9fb96e623f08cc906
sha512=52186b217ad80f2fbcf243020e3e09e3f5358b9596816a749229fe3f8267bbf2750568de0e46ddc6f76ee864f8cf9103b90a4f548c9a911c9866a7f1ea2e2cb8
doc/sendmail.starttls/Sendmail_with_starttls/index.html
Module Sendmail_with_starttlsSource
module 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 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 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) result, 's) Colombe.Sigs.iosendmail impl rdwr flow ctx tls_config ?authentication ~domain sender recipients mail where:
implis the scheduler (unix, lwt or async)rdwrread/write syscallflowwitness of the flow (can be a socket)ctxcontext used by the processtls_configTLS configuration used by STARTTLSauthenticationauthentication information used by the processsendersender of the mailrecipientsrecipients of the mailmailstream of the mail
This process tries 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.
val many :
'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 Seq.t ->
(((reverse_path * forward_path * (unit, error) result) list, error) result,
's)
Colombe.Sigs.iomany impl rdwr flow ctx tls_config ?authentication ~domain transactions sends multiple emails over a single TCP+STARTTLS connection. Each transaction is a (sender, recipients, mail) tuple. The connection is set up once (EHLO, STARTTLS, AUTH), then for each transaction: MAIL FROM, RCPT TO, DATA, body, DOT, RSET. Returns a list of results, one per transaction. If a transaction fails, the connection is reset and the next transaction is attempted.