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,ConnectionandCmdimplementations (in thecommandmodule) -
a cmd implementation, having to use
Io,Socketetc.
§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§
- Provides the
smtp_chainmacro and thechainfunction - Module containing all commands already provided by this crate
- error module
- provieds an extension trait for futures of the form
Future<(Ctx, Result<Item, Err>), Err2> - This modules contains all the
Iotype related parts (for implementingCmd) - Provides access to
Response,ResponseCodeand parsing parts (form implCmd’s) - [feature:
send-mail] provides the send_mail functionality
Macros§
- creates a chain of commands and them to the given connection
Structs§
- represents a
AddressLiteral - represents a smtp extension/capability indicated through ehlo
- The basic
Connectiontype representing an (likely) open smtp connection - Builder for an
ConnectionConfigfor a encrypted smtp connection. - Configuration specifing how to setup an SMTP connection.
- The default tls setup, which just calls
builder.build() - represents a
Domain - A type representing the ehlo response of the last ehlo call
- represents an EsmtpParam (syntax construct in ehlo response)
- represents an EsmtpKeyword (syntax construct in ehlo response)
- represents an EsmtpValue (syntax construct in ehlo response)
- represents a forward path, most times this is just a mail address
- Builder for an
ConnectionConfigfor an unencrypted smtp connection.Cmd - represents a reverse path, most times this is just a mail address
- A Tls configuration
Enums§
- Represents the identity of an client
- configure what kind of security is used
- Which method should be used to handle syntax errors.
Constants§
Traits§
- Trait implemented by any smtp command
- Trait used when setting up tls to modify the setup process
- A alternate version of
Cmdwhich is object safe but has methods which can panic if misused.
Type Aliases§
- A type acting like a
Cmdtrait object - A future resolving to an
Connectioninstance - future returned by
Cmd::exec