Crate mockforge_smtp

Crate mockforge_smtp 

Source
Expand description

SMTP server mocking for MockForge

This crate provides SMTP server functionality for MockForge, allowing you to mock email servers for testing purposes.

§Example

use mockforge_smtp::{SmtpServer, SmtpConfig, SmtpSpecRegistry};
use std::sync::Arc;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let config = SmtpConfig::default();
    let registry = Arc::new(SmtpSpecRegistry::new());

    let server = SmtpServer::new(config, registry);
    server.start().await?;

    Ok(())
}

Structs§

AutoReply
Auto-reply email configuration
BehaviorConfig
Behavior simulation configuration
EmailSearchFilters
Email search filters
ExportConfig
File export configuration
LatencyConfig
Latency configuration
MailboxStats
Mailbox statistics
MatchCriteria
Criteria for matching incoming emails
SmtpConfig
SMTP server configuration
SmtpFixture
An SMTP fixture defining how to handle emails
SmtpResponse
SMTP response configuration
SmtpServer
SMTP server
SmtpSpecRegistry
SMTP protocol registry implementing SpecRegistry trait
StorageConfig
Email storage configuration
StoredEmail
Stored email message