Skip to main content

Module send

Module send 

Source
Expand description

Sending: SMTP submission (RFC 6409), over TLS from the first byte (465, RFC 8314) or upgraded by STARTTLS (587), with the account’s login and password, or an access token (AUTH XOAUTH2) for an account signed in with Google; then a copy into Sent with APPEND, except at Gmail, which files its own.

Building a message and sending it are two steps. A message signed with a key kept here is built when it leaves, at the end of its ten seconds (send_draft). One signed with your security key is built at Send, in the writing window, with its PIN and maybe a touch (build_draft with the key), and sent as built once its ten seconds are gone (send_built).

Enums§

BuildError
Why a draft could not be built.

Constants§

SMTP 🔒

Functions§

build_draft
The message a draft makes, protected as it asks: signed with your key (here, its passphrase from the keyring; on your security key, through card), encrypted to every recipient’s key and to yours, your key handed to whom you write by an Autocrypt header. Nothing goes on the network.
build_draft_with 🔒
file_in_sent 🔒
A copy in Sent, read.
send
Sends the message, then files a copy in Sent. An account signed in with OAuth logs in with an access token (password unused): the one kept, then, refused, a fresh one, once.
send_built
Sends a message built at Send (signed with your security key), its ten seconds gone: the sending server is found first when the account has none.
send_draft
Sends a draft from its account: the sending server is found first when the account has none, and kept in the configuration at config_path. A NotFiled error means it was sent all the same. A draft your security key signs is not sent from here: it is built at Send, in the writing window.
smtp_builder 🔒
The sending server’s client, logged in with credentials when given (an account signed in with OAuth logs in after, sasl::smtp_xoauth2).
smtp_error 🔒
with_smtp 🔒