The server address, credentials, and tuning options.
Releases the pooled connections. It is safe to call more than once.
Sends a composed message.
The message to submit. It may be sent more than once.
An optional cancellation signal.
The server's result for the submission.
SMTPError When the server rejects a command.
SMTPTransactionError When every recipient is rejected; the per-recipient detail is on SMTPTransactionError.result.
Streams an already serialized RFC 5322 message with an explicit envelope.
The message is not parsed, so the caller is responsible for RFC 5322 correctness. Prefer this for large or pre-rendered messages.
The SMTP envelope, independent of the message headers.
The raw message bytes, or an async stream of chunks.
An optional cancellation signal.
The server's result for the submission.
SMTPError When the server rejects a command.
SMTPTransactionError When every recipient is rejected.
Submits mail to the mxRaven SMTP submission service.
A client maintains a bounded pool of authenticated connections and is safe for concurrent use. The submission service requires STARTTLS and SMTP AUTH, so both are always used.
Example