Crate new_tokio_smtp[−][src]
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
pub use self::response::Response; |
pub use self::io::Io; |
Modules
chain |
Provides the |
command |
Module containing all commands already provided by this crate |
error |
error module |
future_ext |
provieds an extension trait for futures of the form |
io |
This modules contains all the |
response |
Provides access to |
send_mail |
[feature: |
Macros
smtp_chain |
creates a chain of commands and them to the given connection |
Structs
AddressLiteral |
represents a |
Capability |
represents a smtp extension/capability indicated through ehlo |
Connection |
The basic |
ConnectionBuilder |
Builder for an |
ConnectionConfig |
Configuration specifing how to setup an SMTP connection. |
DefaultTlsSetup |
The default tls setup, which just calls |
Domain |
represents a |
EhloData |
A type representing the ehlo response of the last ehlo call |
EhloParam |
represents an EsmtpParam (syntax construct in ehlo response) |
EsmtpKeyword |
represents an EsmtpKeyword (syntax construct in ehlo response) |
EsmtpValue |
represents an EsmtpValue (syntax construct in ehlo response) |
ForwardPath |
represents a forward path, most times this is just a mail address |
LocalNonSecureBuilder |
Builder for an |
ReversePath |
represents a reverse path, most times this is just a mail address |
TlsConfig |
A Tls configuration |
Enums
ClientId |
Represents the identity of an client |
Security |
configure what kind of security is used |
SyntaxError |
Constants
DEFAULT_SMTP_MSA_PORT | |
DEFAULT_SMTP_MX_PORT |
Traits
Cmd |
Trait implemented by any smtp command |
SetupTls |
Trait used when setting up tls to modify the setup process |
TypeErasableCmd |
A alternate version of |
Type Definitions
BoxedCmd |
A type acting like a |
ConnectingFuture |
A future resolving to an |
ExecFuture |
future returned by |