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
5//! ([RFC 5321](https://datatracker.ietf.org/doc/html/rfc5321)).
6//!
7//! Both `Client` and `Server` run over plain `std.Io.Reader`/`std.Io.Writer`
8//! pairs, so they work with any transport: TCP streams, in-memory buffers in
9//! tests, or the `Tls` layer. The lower-level protocol pieces — reply
10//! parsing, command parsing, dot-stuffing — are exposed via `protocol`.
11
12const std = @import("std");
13
14pub const protocol = @import("protocol.zig");
15pub const Reply = protocol.Reply;
16pub const Command = protocol.Command;
17pub const Client = @import("Client.zig");
18pub const Server = @import("Server.zig");
19pub const Tls = @import("Tls.zig");
20/// Re-export of the ianic/tls.zig library used for server-side STARTTLS,
21/// e.g. `zsmtp.tls.config.CertKeyPair` for loading the server certificate.
22pub const tls = @import("tls");
23
24test {
25 _ = protocol;
26 _ = Client;
27 _ = Server;
28 _ = Tls;
29}