An SMTP client and server library for Zig implementing RFC 5321.
1// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us>
2// SPDX-License-Identifier: MIT
3
4//! zsmtp — an SMTP client and server library for Zig (RFC 5321).
5//!
6//! Both `Client` and `Server` run over plain `std.Io.Reader`/`std.Io.Writer`
7//! pairs, so they work with any transport: TCP streams, in-memory buffers in
8//! tests, or (eventually) a TLS layer. The lower-level protocol pieces —
9//! reply parsing, command parsing, dot-stuffing — are exposed via `protocol`.
10
11const std = @import("std");
12
13pub const protocol = @import("protocol.zig");
14pub const Reply = protocol.Reply;
15pub const Command = protocol.Command;
16pub const Client = @import("Client.zig");
17pub const Server = @import("Server.zig");
18pub const Tls = @import("Tls.zig");
19/// Re-export of the ianic/tls.zig library used for server-side STARTTLS,
20/// e.g. `zsmtp.tls.config.CertKeyPair` for loading the server certificate.
21pub const tls = @import("tls");
22
23test {
24 _ = protocol;
25 _ = Client;
26 _ = Server;
27 _ = Tls;
28}