add SMTPClient module: connection layer, message formatter, public API, tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-14 05:25:03 +01:00
parent 427f197bb3
commit 54ce92e280
9 changed files with 695 additions and 1 deletions
@@ -0,0 +1,14 @@
/// Represents a complete SMTP response (possibly multi-line).
/// SMTP responses consist of a 3-digit code and one or more text lines.
public struct SMTPResponse: Sendable {
public let code: Int
public let lines: [String]
public var message: String {
lines.joined(separator: "\n")
}
public var isSuccess: Bool {
code >= 200 && code < 400
}
}