MCPcopy Index your code
hub / github.com/chatmail/async-smtp

github.com/chatmail/async-smtp @v0.10.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.10.2 ↗ · + Follow
123 symbols 169 edges 12 files 44 documented · 36%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

async-smtp

Async implementation of SMTP

Crates.io version

Download

docs.rs docs

CI status

API Docs | Releases

Based on the great lettre library.

Example

pub type Error = Box<dyn std::error::Error + Send + Sync>;
pub type Result<T> = std::result::Result<T, Error>;

use async_smtp::{Envelope, SendableEmail, SmtpClient, SmtpTransport};

async fn smtp_transport_simple() -> Result<()> {
    let stream = TcpStream::connect("127.0.0.1:2525").await?;
    let client = SmtpClient::new();
    let mut transport = SmtpTransport::new(client, stream).await?;

    let email = SendableEmail::new(
        Envelope::new(
            Some("user@localhost".parse().unwrap()),
            vec!["root@localhost".parse().unwrap()],
        )?,
        "Hello world",
    );
    transport.send(email).await?;

    Ok(())
}

License

Licensed under either of * Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) * MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Extension points exported contracts — how you extend this code

IntoCredentials (Interface)
Convertible to user credentials [2 implementers]
src/authentication.rs

Core symbols most depended-on inside this repo

command
called by 8
src/stream.rs
send_command
called by 4
src/stream.rs
read_response
called by 4
src/stream.rs
envelope
called by 4
src/types.rs
supports_feature
called by 4
src/smtp_client.rs
as_ref
called by 3
src/types.rs
parse_response
called by 3
src/response.rs
to
called by 2
src/types.rs

Shape

Method 58
Function 29
Class 24
Enum 11
Interface 1

Languages

Rust100%

Modules by API surface

src/response.rs27 symbols
src/smtp_client.rs17 symbols
src/extension.rs16 symbols
src/commands.rs16 symbols
src/types.rs15 symbols
src/stream.rs11 symbols
src/authentication.rs11 symbols
src/util.rs3 symbols
src/error.rs3 symbols
src/codec.rs3 symbols
examples/send.rs1 symbols

For agents

$ claude mcp add async-smtp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact