Crate mailin_embedded

Source
Expand description

A SMTP server that can be embedded into another program

This library provides a simple embeddable SMTP server. The server uses blocking IO and a threadpool.

§Examples

use mailin_embedded::{Server, SslConfig, Handler};

#[derive(Clone)]
struct MyHandler {}
impl Handler for MyHandler{}

let handler = MyHandler {};
let mut server = Server::new(handler);

server.with_name("example.com")
   .with_ssl(SslConfig::None)?
   .with_addr("127.0.0.1:25")?;
server.serve();

Modules§

err
Custom error type for mailin_embedded
response
Response contains a selection of SMTP responses for use in handlers.

Structs§

Response
Response contains a code and message to be sent back to the client
Server
Server is used to configure and start the SMTP server

Enums§

Action
Action indicates the recommended action to take on a response
AuthMechanism
Supported authentication mechanisms
SslConfig
SslConfig is used to configure the STARTTLS configuration of the server

Traits§

Handler
A Handler makes decisions about incoming mail commands.