15 lines
355 B
Swift
15 lines
355 B
Swift
/// 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
|
|
}
|
|
}
|