Crate new_tokio_smtp
source ·Expand description
The new-tokio-smtp crate provides an extendible SMTP (Simple Mail Transfer Protocol) implementation using tokio.
This crate provides only SMTP functionality, this means it does neither provides functionality for creating mails, nor for e.g. retrying sending a mail if the receiver was temporary not available.
This crate can be seen from two perspectives:
-
a normal API user, mainly bothering with
ConnectionConfig
,Connection
andCmd
implementations (in thecommand
module) -
a cmd implementation, having to use
Io
,Socket
etc.
Features
send_mail
While still not handling the creation/encoding of mails if this feature is
enabled a send_mail
command is added Connection
which combines the steps
of sending the MAIL
command, the RCPT
command and the DATA
command.
mock-support
, mock-impl
Extend the Socket
abstraction to include a mock socket additional to Tcp
, TcpTls
.
Also provides a mock socket implementation for simply testing commands. Custom implementations
can be provided too if needed for testing
Re-exports
Modules
smtp_chain
macro and the chain
functionFuture<(Ctx, Result<Item, Err>), Err2>
Io
type related parts (for implementing Cmd
)Response
, ResponseCode
and parsing parts (form impl Cmd
’s)send-mail
] provides the send_mail functionalityMacros
Structs
AddressLiteral
Connection
type representing an (likely) open smtp connectionConnectionConfig
for a encrypted smtp connection.builder.build()
Domain
ConnectionConfig
for an unencrypted smtp connection.CmdEnums
Constants
Traits
Cmd
which is object safe
but has methods which can panic if misused.Type Definitions
Cmd
trait objectConnection
instanceCmd::exec