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 or Microsoft; then a copy into Sent with APPEND, except at Gmail and at Microsoft, which file their 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.
files_its_own_sent 🔒
Gmail and Microsoft (Outlook.com and Microsoft 365 alike) file a copy of each message sent through their SMTP server in Sent themselves: an APPEND would make it twice.
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; a refusal no token changes (Microsoft’s Authenticated SMTP switched off) is said at 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 🔒
smtp_sign_in_with_tokens 🔒
AUTH XOAUTH2 on connections connect makes, with the tokens token gives: the one kept first; refused, a fresh one, once; refused again, the access must be given again. A refusal no token changes (Microsoft’s Authenticated SMTP switched off) is said at once (OAuth::smtp_refused).
with_smtp 🔒