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:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user