[][src]Crate mailin_embedded

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")
   .unwrap();
server.serve_forever();

Structs

RunningServer

A running SMTP server

Server

Server is used to configure and start the SMTP server

Enums

AuthMechanism

Supported authentication mechanisms

AuthResult

AuthResult is the result of authenticating a smtp session

DataResult

DataResult is the result of an smtp DATA command

HeloResult

HeloResult is the result of an smtp HELO or EHLO command

MailResult

MailResult is the result of an smtp MAIL command

RcptResult

RcptResult is the result of an smtp RCPT command

SslConfig

SslConfig is used to configure the STARTTLS configuration of the server

Traits

Handler

A Handler makes decisions about incoming mail commands.