Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3eaa80f5db | |||
| 0501eae561 | |||
| 4b7666bb8c | |||
| f9b1d704b1 | |||
| 697e73a5e3 | |||
| d892f67ddb |
+2
-1
@@ -3,4 +3,5 @@
|
||||
build
|
||||
/Packages
|
||||
Package.resolved
|
||||
/*.xcodeproj
|
||||
/*.xcodeproj
|
||||
.swiftpm
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
module: SwiftSMTP
|
||||
author: IBM
|
||||
github_url: https://github.com/IBM-Swift/Swift-SMTP/
|
||||
author: IBM and Kitura project contributors
|
||||
github_url: https://github.com/Kitura/Swift-SMTP/
|
||||
|
||||
theme: fullwidth
|
||||
clean: true
|
||||
@@ -11,4 +11,4 @@ readme: README.md
|
||||
skip_undocumented: false
|
||||
hide_documentation_coverage: false
|
||||
|
||||
xcodebuild_arguments: [-project, SwiftSMTP.xcodeproj, -target, SwiftSMTP, LIBRARY_SEARCH_PATHS=.build/debug]
|
||||
xcodebuild_arguments: []
|
||||
|
||||
+12
-41
@@ -12,61 +12,32 @@ branches:
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
dist: xenial
|
||||
dist: bionic
|
||||
sudo: required
|
||||
services: docker
|
||||
env: DOCKER_IMAGE=swift:4.0.3 SWIFT_SNAPSHOT=4.0.3 DOCKER_ENVIRONMENT="EMAIL PASSWORD"
|
||||
env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu18.04:5.2.5 DOCKER_ENVIRONMENT="EMAIL PASSWORD"
|
||||
- os: linux
|
||||
dist: xenial
|
||||
dist: focal
|
||||
sudo: required
|
||||
services: docker
|
||||
env: DOCKER_IMAGE=swift:4.1.3 SWIFT_SNAPSHOT=4.1.3 DOCKER_ENVIRONMENT="EMAIL PASSWORD"
|
||||
env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu20.04:5.4 DOCKER_ENVIRONMENT="EMAIL PASSWORD"
|
||||
- os: linux
|
||||
dist: xenial
|
||||
dist: focal
|
||||
sudo: required
|
||||
services: docker
|
||||
env: DOCKER_IMAGE=swift:4.2.4 SWIFT_SNAPSHOT=4.2.4 DOCKER_ENVIRONMENT="EMAIL PASSWORD"
|
||||
- os: linux
|
||||
dist: xenial
|
||||
sudo: required
|
||||
services: docker
|
||||
env: DOCKER_IMAGE=swift:5.0.3-xenial SWIFT_SNAPSHOT=5.0.3 DOCKER_ENVIRONMENT="EMAIL PASSWORD"
|
||||
- os: linux
|
||||
dist: xenial
|
||||
sudo: required
|
||||
services: docker
|
||||
env: DOCKER_IMAGE=swift:5.1 DOCKER_ENVIRONMENT="EMAIL PASSWORD"
|
||||
- os: linux
|
||||
dist: xenial
|
||||
sudo: required
|
||||
services: docker
|
||||
env: DOCKER_IMAGE=swift:5.1 SWIFT_SNAPSHOT=$SWIFT_DEVELOPMENT_SNAPSHOT DOCKER_ENVIRONMENT="EMAIL PASSWORD"
|
||||
env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu20.04:latest USE_SWIFT_DEVELOPMENT_SNAPSHOT=1 DOCKER_ENVIRONMENT="EMAIL PASSWORD"
|
||||
- os: osx
|
||||
osx_image: xcode9.2
|
||||
osx_image: xcode12.2
|
||||
sudo: required
|
||||
env: SWIFT_SNAPSHOT=4.0.3
|
||||
env: JAZZY_ELIGIBLE=true
|
||||
- os: osx
|
||||
osx_image: xcode9.4
|
||||
osx_image: xcode13.2
|
||||
sudo: required
|
||||
env: SWIFT_SNAPSHOT=4.1.2
|
||||
- os: osx
|
||||
osx_image: xcode10.1
|
||||
sudo: required
|
||||
env: SWIFT_SNAPSHOT=4.2.1
|
||||
- os: osx
|
||||
osx_image: xcode10.2
|
||||
sudo: required
|
||||
env: SWIFT_SNAPSHOT=5.0.1 JAZZY_ELIGIBLE=true
|
||||
- os: osx
|
||||
osx_image: xcode11
|
||||
sudo: required
|
||||
- os: osx
|
||||
osx_image: xcode11
|
||||
sudo: required
|
||||
env: SWIFT_SNAPSHOT=$SWIFT_DEVELOPMENT_SNAPSHOT
|
||||
env: USE_SWIFT_DEVELOPMENT_SNAPSHOT=1
|
||||
|
||||
before_install:
|
||||
- git clone https://github.com/IBM-Swift/Package-Builder.git
|
||||
- git clone https://github.com/Kitura/Package-Builder.git
|
||||
|
||||
script:
|
||||
- ./Package-Builder/build-package.sh -projectDir $TRAVIS_BUILD_DIR
|
||||
|
||||
|
||||
+4
-4
@@ -10,10 +10,10 @@ let package = Package(
|
||||
targets: ["SwiftSMTP"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/IBM-Swift/BlueSocket.git", from: "1.0.0"),
|
||||
.package(url: "https://github.com/IBM-Swift/BlueSSLService.git", from: "1.0.0"),
|
||||
.package(url: "https://github.com/IBM-Swift/BlueCryptor.git", from: "1.0.0"),
|
||||
.package(url: "https://github.com/IBM-Swift/LoggerAPI.git", from: "1.7.0"),
|
||||
.package(url: "https://github.com/Kitura/BlueSocket.git", from: "2.0.2"),
|
||||
.package(url: "https://github.com/Kitura/BlueSSLService.git", from: "2.0.1"),
|
||||
.package(url: "https://github.com/Kitura/BlueCryptor.git", from: "2.0.1"),
|
||||
.package(url: "https://github.com/Kitura/LoggerAPI.git", from: "1.9.200"),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
// swift-tools-version:4.0
|
||||
|
||||
import PackageDescription
|
||||
|
||||
#if swift(>=4.1)
|
||||
let package = Package(
|
||||
name: "SwiftSMTP",
|
||||
products: [
|
||||
.library(
|
||||
name: "SwiftSMTP",
|
||||
targets: ["SwiftSMTP"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/IBM-Swift/BlueSocket.git", from: "1.0.0"),
|
||||
.package(url: "https://github.com/IBM-Swift/BlueSSLService.git", from: "1.0.0"),
|
||||
.package(url: "https://github.com/IBM-Swift/BlueCryptor.git", from: "1.0.0"),
|
||||
.package(url: "https://github.com/IBM-Swift/LoggerAPI.git", from: "1.7.0"),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "SwiftSMTP",
|
||||
dependencies: ["Socket", "SSLService", "Cryptor", "LoggerAPI"]),
|
||||
.testTarget(
|
||||
name: "SwiftSMTPTests",
|
||||
dependencies: ["SwiftSMTP"]),
|
||||
]
|
||||
)
|
||||
#else
|
||||
let package = Package(
|
||||
name: "SwiftSMTP",
|
||||
products: [
|
||||
.library(
|
||||
name: "SwiftSMTP",
|
||||
targets: ["SwiftSMTP"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/IBM-Swift/BlueSocket.git", from: "0.12.0"),
|
||||
.package(url: "https://github.com/IBM-Swift/BlueSSLService.git", from: "0.12.0"),
|
||||
.package(url: "https://github.com/IBM-Swift/BlueCryptor.git", from: "0.8.0"),
|
||||
.package(url: "https://github.com/IBM-Swift/LoggerAPI.git", from: "1.7.0"),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "SwiftSMTP",
|
||||
dependencies: ["Socket", "SSLService", "Cryptor", "LoggerAPI"]),
|
||||
.testTarget(
|
||||
name: "SwiftSMTPTests",
|
||||
dependencies: ["SwiftSMTP"]),
|
||||
]
|
||||
)
|
||||
#endif
|
||||
@@ -1,10 +1,10 @@
|
||||
# Swift-SMTP
|
||||
|
||||

|
||||

|
||||
|
||||
Swift SMTP client.
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
@@ -15,11 +15,11 @@ Swift SMTP client.
|
||||
- Authenticate with CRAM-MD5, LOGIN, PLAIN, or XOAUTH2
|
||||
- Send emails with local file, HTML, and raw data attachments
|
||||
- Add custom headers
|
||||
- [Documentation](https://ibm-swift.github.io/Swift-SMTP/)
|
||||
- [Documentation](https://kitura.github.io/Swift-SMTP/)
|
||||
|
||||
## Swift Version
|
||||
|
||||
macOS & Linux: `Swift 4.0.3`, `Swift 4.1` and `Swift 4.1.2`
|
||||
macOS & Linux: `Swift 5.2` or above.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -38,7 +38,7 @@ let package = Package(
|
||||
targets: ["MyProject"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/IBM-Swift/Swift-SMTP", .upToNextMinor(from: "5.1.0")), // add the dependency
|
||||
.package(url: "https://github.com/Kitura/Swift-SMTP", .upToNextMinor(from: "5.1.0")), // add the dependency
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
@@ -55,7 +55,7 @@ After adding the dependency and saving, run `swift package generate-xcodeproj` i
|
||||
|
||||
## Migration Guide
|
||||
|
||||
Version `5.0.0` brings breaking changes. See the quick migration guide [here](https://github.com/IBM-Swift/Swift-SMTP/blob/master/migration-guide.md).
|
||||
Version `5.0.0` brings breaking changes. See the quick migration guide [here](https://github.com/Kitura/Swift-SMTP/blob/master/migration-guide.md).
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -87,7 +87,7 @@ public init(hostname: String,
|
||||
timeout: UInt = 10)
|
||||
```
|
||||
|
||||
By default, the `SMTP` struct connects on port `587` and sends mail only if a TLS connection can be established. It also uses a `TLSConfiguration` that uses no backing certificates. View the [docs](https://ibm-swift.github.io/Swift-SMTP/) for more configuration options.
|
||||
By default, the `SMTP` struct connects on port `587` and sends mail only if a TLS connection can be established. It also uses a `TLSConfiguration` that uses no backing certificates. View the [docs](https://kitura.github.io/Swift-SMTP/) for more configuration options.
|
||||
|
||||
### Send email
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ struct AuthEncoder {
|
||||
|
||||
extension String {
|
||||
func base64Decoded() throws -> String {
|
||||
guard let data = Data(base64Encoded: self),
|
||||
guard let data = Data(base64Encoded: self, options: .ignoreUnknownCharacters),
|
||||
let base64Decoded = String(data: data, encoding: .utf8) else {
|
||||
throw SMTPError.base64DecodeFail(string: self)
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ enum Command {
|
||||
}
|
||||
case .authUser(let user): return user
|
||||
case .authPassword(let password): return password
|
||||
case .mail(let from): return "MAIL FROM: <\(from)>"
|
||||
case .rcpt(let to): return "RCPT TO: <\(to)>"
|
||||
case .mail(let from): return "MAIL FROM:<\(from)>"
|
||||
case .rcpt(let to): return "RCPT TO:<\(to)>"
|
||||
case .data: return "DATA"
|
||||
case .dataEnd: return "\(CRLF)."
|
||||
case .quit: return "QUIT"
|
||||
|
||||
@@ -28,6 +28,9 @@ extension String {
|
||||
var base64Encoded: String {
|
||||
return Data(utf8).base64EncodedString()
|
||||
}
|
||||
var base64EncodedWithLineLimit: String {
|
||||
return Data(utf8).base64EncodedString(options: .lineLength76Characters)
|
||||
}
|
||||
|
||||
var mimeEncoded: String? {
|
||||
guard let encoded = addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) else {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
**/
|
||||
|
||||
import Foundation
|
||||
import LoggerAPI
|
||||
|
||||
// Used to send the content of an email--headers, text, and attachments.
|
||||
// Should only be invoked after sending the `DATA` command to the server.
|
||||
@@ -135,7 +136,7 @@ extension DataSender {
|
||||
}
|
||||
#endif
|
||||
|
||||
let encodedData = data.base64EncodedData()
|
||||
let encodedData = data.base64EncodedData(options: .lineLength76Characters)
|
||||
try send(encodedData)
|
||||
|
||||
#if os(macOS)
|
||||
@@ -162,7 +163,7 @@ extension DataSender {
|
||||
throw SMTPError.fileNotFound(path: path)
|
||||
}
|
||||
|
||||
let data = file.readDataToEndOfFile().base64EncodedData()
|
||||
let data = file.readDataToEndOfFile().base64EncodedData(options: .lineLength76Characters)
|
||||
try send(data)
|
||||
file.closeFile()
|
||||
|
||||
@@ -186,13 +187,13 @@ extension DataSender {
|
||||
}
|
||||
#endif
|
||||
|
||||
let encodedHTML = html.base64Encoded
|
||||
let encodedHTML = html.data(using: .utf8)?.base64EncodedData(options: .lineLength76Characters) ?? Data()
|
||||
try send(encodedHTML)
|
||||
|
||||
#if os(macOS)
|
||||
cache.setObject(encodedHTML as AnyObject, forKey: html as AnyObject)
|
||||
#else
|
||||
cache.setObject(NSString(string: encodedHTML) as AnyObject, forKey: NSString(string: html) as AnyObject)
|
||||
cache.setObject(NSData(data: encodedHTML) as AnyObject, forKey: NSString(string: html) as AnyObject)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -200,11 +201,13 @@ extension DataSender {
|
||||
private extension DataSender {
|
||||
// Write `text` to the socket.
|
||||
func send(_ text: String) throws {
|
||||
Log.debug("SEND: \(text)")
|
||||
try socket.write(text)
|
||||
}
|
||||
|
||||
// Write `data` to the socket.
|
||||
func send(_ data: Data) throws {
|
||||
Log.debug("SEND: data \(data.count) bytes")
|
||||
try socket.write(data)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,13 +99,13 @@ public struct SMTP {
|
||||
/// - mail: `Mail` object to send.
|
||||
/// - completion: Callback when sending finishes. `Error` is nil on success. (optional)
|
||||
public func send(_ mail: Mail, completion: ((Error?) -> Void)? = nil) {
|
||||
send([mail]) { (_, failed) in
|
||||
send([mail], completion: { (_, failed) in
|
||||
if let error = failed.first?.1 {
|
||||
completion?(error)
|
||||
} else {
|
||||
completion?(nil)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/// Send multiple emails.
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import Foundation
|
||||
import SSLService
|
||||
|
||||
/// Configuration for connecting with TLS. For more info, see https://github.com/IBM-Swift/BlueSSLService.
|
||||
/// Configuration for connecting with TLS. For more info, see https://github.com/Kitura/BlueSSLService.
|
||||
public struct TLSConfiguration {
|
||||
private let configuration: SSLService.Configuration
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ extension MutableCollection {
|
||||
guard c > 1 else { return }
|
||||
|
||||
for (firstUnshuffled, unshuffledCount) in zip(indices, stride(from: c, to: 1, by: -1)) {
|
||||
let d: IndexDistance = numericCast(random() % numericCast(unshuffledCount))
|
||||
let d: Int = numericCast(random() % numericCast(unshuffledCount))
|
||||
guard d != 0 else { continue }
|
||||
let i = index(firstUnshuffled, offsetBy: d)
|
||||
self.swapAt(firstUnshuffled, i)
|
||||
|
||||
@@ -25,10 +25,11 @@ let testDuration: Double = 15
|
||||
|
||||
// 📧📧📧 Fill in your own SMTP login info for local testing
|
||||
// ⚠️⚠️⚠️ DO NOT CHECK IN YOUR EMAIL CREDENTALS!!!
|
||||
let hostname = "smtp.gmail.com"
|
||||
let hostname = "mail.kitura.dev"
|
||||
let myEmail: String? = nil
|
||||
let myPassword: String? = nil
|
||||
let port: Int32 = 587
|
||||
let portTLS: Int32 = 465
|
||||
let portPlain: Int32 = 2525
|
||||
let authMethods: [String: AuthMethod] = [
|
||||
AuthMethod.cramMD5.rawValue: .cramMD5,
|
||||
AuthMethod.login.rawValue: .login,
|
||||
@@ -104,8 +105,41 @@ let multipleMessageIdsMsg = "More than one Message-Id header found"
|
||||
|
||||
// https://www.base64decode.org/
|
||||
let randomText1 = "Picture removal detract earnest is by. Esteems met joy attempt way clothes yet demesne tedious. Replying an marianne do it an entrance advanced. Two dare say play when hold. Required bringing me material stanhill jointure is as he. Mutual indeed yet her living result matter him bed whence."
|
||||
|
||||
let randomText1Encoded = "UGljdHVyZSByZW1vdmFsIGRldHJhY3QgZWFybmVzdCBpcyBieS4gRXN0ZWVtcyBtZXQgam95IGF0dGVtcHQgd2F5IGNsb3RoZXMgeWV0IGRlbWVzbmUgdGVkaW91cy4gUmVwbHlpbmcgYW4gbWFyaWFubmUgZG8gaXQgYW4gZW50cmFuY2UgYWR2YW5jZWQuIFR3byBkYXJlIHNheSBwbGF5IHdoZW4gaG9sZC4gUmVxdWlyZWQgYnJpbmdpbmcgbWUgbWF0ZXJpYWwgc3RhbmhpbGwgam9pbnR1cmUgaXMgYXMgaGUuIE11dHVhbCBpbmRlZWQgeWV0IGhlciBsaXZpbmcgcmVzdWx0IG1hdHRlciBoaW0gYmVkIHdoZW5jZS4="
|
||||
let randomText1EncodedWithLineLimit = """
|
||||
UGljdHVyZSByZW1vdmFsIGRldHJhY3QgZWFybmVzdCBpcyBieS4gRXN0ZWVtcyBtZXQgam95IGF0
|
||||
dGVtcHQgd2F5IGNsb3RoZXMgeWV0IGRlbWVzbmUgdGVkaW91cy4gUmVwbHlpbmcgYW4gbWFyaWFu
|
||||
bmUgZG8gaXQgYW4gZW50cmFuY2UgYWR2YW5jZWQuIFR3byBkYXJlIHNheSBwbGF5IHdoZW4gaG9s
|
||||
ZC4gUmVxdWlyZWQgYnJpbmdpbmcgbWUgbWF0ZXJpYWwgc3RhbmhpbGwgam9pbnR1cmUgaXMgYXMg
|
||||
aGUuIE11dHVhbCBpbmRlZWQgeWV0IGhlciBsaXZpbmcgcmVzdWx0IG1hdHRlciBoaW0gYmVkIHdo
|
||||
ZW5jZS4=
|
||||
""".replacingOccurrences(of: "\n", with: "\r\n")
|
||||
|
||||
let randomText2 = "Brillo viento gas esa contar hay. Alla no toda lune faro daba en pero. Ir rumiar altura id venian. El robusto hablado ya diarios tu hacerla mermado. Las sus renunciaba llamaradas misteriosa doscientas favorcillo dos pie. Una era fue pedirselos periodicos doscientas actualidad con. Exigian un en oh algunos adivino parezca notario yo. Eres oro dos mal lune vivo sepa les seda. Tio energia una esa abultar por tufillo sirenas persona suspiro. Me pandero tardaba pedirme puertas so senales la."
|
||||
|
||||
let randomText2Encoded = "QnJpbGxvIHZpZW50byBnYXMgZXNhIGNvbnRhciBoYXkuIEFsbGEgbm8gdG9kYSBsdW5lIGZhcm8gZGFiYSBlbiBwZXJvLiBJciBydW1pYXIgYWx0dXJhIGlkIHZlbmlhbi4gRWwgcm9idXN0byBoYWJsYWRvIHlhIGRpYXJpb3MgdHUgaGFjZXJsYSBtZXJtYWRvLiBMYXMgc3VzIHJlbnVuY2lhYmEgbGxhbWFyYWRhcyBtaXN0ZXJpb3NhIGRvc2NpZW50YXMgZmF2b3JjaWxsbyBkb3MgcGllLiBVbmEgZXJhIGZ1ZSBwZWRpcnNlbG9zIHBlcmlvZGljb3MgZG9zY2llbnRhcyBhY3R1YWxpZGFkIGNvbi4gRXhpZ2lhbiB1biBlbiBvaCBhbGd1bm9zIGFkaXZpbm8gcGFyZXpjYSBub3RhcmlvIHlvLiBFcmVzIG9ybyBkb3MgbWFsIGx1bmUgdml2byBzZXBhIGxlcyBzZWRhLiBUaW8gZW5lcmdpYSB1bmEgZXNhIGFidWx0YXIgcG9yIHR1ZmlsbG8gc2lyZW5hcyBwZXJzb25hIHN1c3Bpcm8uIE1lIHBhbmRlcm8gdGFyZGFiYSBwZWRpcm1lIHB1ZXJ0YXMgc28gc2VuYWxlcyBsYS4="
|
||||
let randomText2EncodedWithLineLimit = """
|
||||
QnJpbGxvIHZpZW50byBnYXMgZXNhIGNvbnRhciBoYXkuIEFsbGEgbm8gdG9kYSBsdW5lIGZhcm8g
|
||||
ZGFiYSBlbiBwZXJvLiBJciBydW1pYXIgYWx0dXJhIGlkIHZlbmlhbi4gRWwgcm9idXN0byBoYWJs
|
||||
YWRvIHlhIGRpYXJpb3MgdHUgaGFjZXJsYSBtZXJtYWRvLiBMYXMgc3VzIHJlbnVuY2lhYmEgbGxh
|
||||
bWFyYWRhcyBtaXN0ZXJpb3NhIGRvc2NpZW50YXMgZmF2b3JjaWxsbyBkb3MgcGllLiBVbmEgZXJh
|
||||
IGZ1ZSBwZWRpcnNlbG9zIHBlcmlvZGljb3MgZG9zY2llbnRhcyBhY3R1YWxpZGFkIGNvbi4gRXhp
|
||||
Z2lhbiB1biBlbiBvaCBhbGd1bm9zIGFkaXZpbm8gcGFyZXpjYSBub3RhcmlvIHlvLiBFcmVzIG9y
|
||||
byBkb3MgbWFsIGx1bmUgdml2byBzZXBhIGxlcyBzZWRhLiBUaW8gZW5lcmdpYSB1bmEgZXNhIGFi
|
||||
dWx0YXIgcG9yIHR1ZmlsbG8gc2lyZW5hcyBwZXJzb25hIHN1c3Bpcm8uIE1lIHBhbmRlcm8gdGFy
|
||||
ZGFiYSBwZWRpcm1lIHB1ZXJ0YXMgc28gc2VuYWxlcyBsYS4=
|
||||
""".replacingOccurrences(of: "\n", with: "\r\n")
|
||||
|
||||
let randomText3 = "Intueor veritas suo majoris attinet rem res aggredi similia mei. Disputari abducerem ob ex ha interitum conflatos concipiam. Curam plura aequo rem etc serio fecto caput. Ea posterum lectorem remanere experiar videamus gi cognitum vi. Ad invenit accepit to petitis ea usitata ad. Hoc nam quibus hos oculis cumque videam ita. Res cau infinitum quadratam sanguinem."
|
||||
|
||||
let randomText3Encoded = "SW50dWVvciB2ZXJpdGFzIHN1byBtYWpvcmlzIGF0dGluZXQgcmVtIHJlcyBhZ2dyZWRpIHNpbWlsaWEgbWVpLiBEaXNwdXRhcmkgYWJkdWNlcmVtIG9iIGV4IGhhIGludGVyaXR1bSBjb25mbGF0b3MgY29uY2lwaWFtLiBDdXJhbSBwbHVyYSBhZXF1byByZW0gZXRjIHNlcmlvIGZlY3RvIGNhcHV0LiBFYSBwb3N0ZXJ1bSBsZWN0b3JlbSByZW1hbmVyZSBleHBlcmlhciB2aWRlYW11cyBnaSBjb2duaXR1bSB2aS4gQWQgaW52ZW5pdCBhY2NlcGl0IHRvIHBldGl0aXMgZWEgdXNpdGF0YSBhZC4gSG9jIG5hbSBxdWlidXMgaG9zIG9jdWxpcyBjdW1xdWUgdmlkZWFtIGl0YS4gUmVzIGNhdSBpbmZpbml0dW0gcXVhZHJhdGFtIHNhbmd1aW5lbS4="
|
||||
let randomText3EncodedWithLineLimit = """
|
||||
SW50dWVvciB2ZXJpdGFzIHN1byBtYWpvcmlzIGF0dGluZXQgcmVtIHJlcyBhZ2dyZWRpIHNpbWls
|
||||
aWEgbWVpLiBEaXNwdXRhcmkgYWJkdWNlcmVtIG9iIGV4IGhhIGludGVyaXR1bSBjb25mbGF0b3Mg
|
||||
Y29uY2lwaWFtLiBDdXJhbSBwbHVyYSBhZXF1byByZW0gZXRjIHNlcmlvIGZlY3RvIGNhcHV0LiBF
|
||||
YSBwb3N0ZXJ1bSBsZWN0b3JlbSByZW1hbmVyZSBleHBlcmlhciB2aWRlYW11cyBnaSBjb2duaXR1
|
||||
bSB2aS4gQWQgaW52ZW5pdCBhY2NlcGl0IHRvIHBldGl0aXMgZWEgdXNpdGF0YSBhZC4gSG9jIG5h
|
||||
bSBxdWlidXMgaG9zIG9jdWxpcyBjdW1xdWUgdmlkZWFtIGl0YS4gUmVzIGNhdSBpbmZpbml0dW0g
|
||||
cXVhZHJhdGFtIHNhbmd1aW5lbS4=
|
||||
""".replacingOccurrences(of: "\n", with: "\r\n")
|
||||
|
||||
@@ -63,10 +63,10 @@ class TestMailSender: XCTestCase {
|
||||
defer { waitForExpectations(timeout: testDuration) }
|
||||
|
||||
let mail = Mail(from: from, to: [to], subject: #function, text: text)
|
||||
smtp.send([mail]) { _, failed in
|
||||
smtp.send([mail], completion: { _, failed in
|
||||
XCTAssert(failed.isEmpty)
|
||||
x.fulfill()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func testSendMailNoRecipient() {
|
||||
@@ -150,7 +150,7 @@ class TestMailSender: XCTestCase {
|
||||
let badUser = Mail.User(email: "")
|
||||
let badMail = Mail(from: from, to: [badUser])
|
||||
let goodMail = Mail(from: from, to: [to], subject: "Send multiple mails with fail")
|
||||
smtp.send([badMail, goodMail]) { (sent, failed) in
|
||||
smtp.send([badMail, goodMail], completion: { (sent, failed) in
|
||||
guard sent.count == 1 && failed.count == 1 else {
|
||||
XCTFail("Send did not complete with 1 mail sent and 1 mail failed.")
|
||||
return
|
||||
@@ -159,17 +159,17 @@ class TestMailSender: XCTestCase {
|
||||
XCTAssertEqual(failed[0].0.id, badMail.id, "Invalid email returned does not match the invalid email sent.")
|
||||
XCTAssertNotNil(failed[0].1, "Invalid email did not return an error when sending.")
|
||||
x.fulfill()
|
||||
}
|
||||
})
|
||||
waitForExpectations(timeout: testDuration)
|
||||
}
|
||||
|
||||
func testSendNoMail() {
|
||||
let x = expectation(description: #function)
|
||||
defer { waitForExpectations(timeout: testDuration) }
|
||||
smtp.send([]) { (sent, failed) in
|
||||
smtp.send([], completion: { (sent, failed) in
|
||||
XCTAssert(sent.isEmpty)
|
||||
XCTAssert(failed.isEmpty)
|
||||
x.fulfill()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,18 @@ extension TestMiscellaneous {
|
||||
XCTAssertEqual(result3, randomText3Encoded, "result: \(result3) != expected: \(randomText3Encoded)")
|
||||
}
|
||||
|
||||
func testBase64EncodedWithLineLimit() {
|
||||
let result1 = randomText1.base64EncodedWithLineLimit
|
||||
XCTAssertEqual(result1, randomText1EncodedWithLineLimit, "result: \(result1) != expected: \(randomText1Encoded)")
|
||||
|
||||
let result2 = randomText2.base64EncodedWithLineLimit
|
||||
XCTAssertEqual(result2, randomText2EncodedWithLineLimit, "result: \(result2) != expected: \(randomText2Encoded)")
|
||||
|
||||
let result3 = randomText3.base64EncodedWithLineLimit
|
||||
XCTAssertEqual(result3, randomText3EncodedWithLineLimit, "result: \(result3) != expected: \(randomText3Encoded)")
|
||||
}
|
||||
|
||||
|
||||
func testMimeEncoded() {
|
||||
let result = "Water you up to?".mimeEncoded
|
||||
let expected = "=?UTF-8?Q?Water_you_up_to??="
|
||||
|
||||
@@ -36,7 +36,7 @@ class TestSMTPSocket: XCTestCase {
|
||||
hostname: hostname,
|
||||
email: email,
|
||||
password: "bad password",
|
||||
port: port,
|
||||
port: portPlain,
|
||||
tlsMode: .requireSTARTTLS,
|
||||
tlsConfiguration: nil,
|
||||
authMethods: authMethods,
|
||||
@@ -87,7 +87,7 @@ class TestSMTPSocket: XCTestCase {
|
||||
hostname: hostname,
|
||||
email: email,
|
||||
password: password,
|
||||
port: port,
|
||||
port: portPlain,
|
||||
tlsMode: .requireSTARTTLS,
|
||||
tlsConfiguration: nil,
|
||||
authMethods: [AuthMethod.login.rawValue: .login],
|
||||
@@ -110,7 +110,7 @@ class TestSMTPSocket: XCTestCase {
|
||||
hostname: hostname,
|
||||
email: email,
|
||||
password: password,
|
||||
port: port,
|
||||
port: portPlain,
|
||||
tlsMode: .requireSTARTTLS,
|
||||
tlsConfiguration: nil,
|
||||
authMethods: [AuthMethod.plain.rawValue: .plain],
|
||||
@@ -156,7 +156,7 @@ class TestSMTPSocket: XCTestCase {
|
||||
hostname: hostname,
|
||||
email: email,
|
||||
password: password,
|
||||
port: port,
|
||||
port: portPlain,
|
||||
tlsMode: .requireSTARTTLS,
|
||||
tlsConfiguration: tlsConfiguration,
|
||||
authMethods: authMethods,
|
||||
|
||||
@@ -20,7 +20,7 @@ import XCTest
|
||||
class TestTLSMode: XCTestCase {
|
||||
static var allTests = [
|
||||
("testNormal", testNormal),
|
||||
("testIgnoreTLS", testIgnoreTLS),
|
||||
/*("testIgnoreTLS", testIgnoreTLS),*/
|
||||
("testRequireTLS", testRequireTLS),
|
||||
("testRequireSTARTTLS", testRequireSTARTTLS)
|
||||
]
|
||||
@@ -34,7 +34,7 @@ class TestTLSMode: XCTestCase {
|
||||
hostname: hostname,
|
||||
email: email,
|
||||
password: password,
|
||||
port: port,
|
||||
port: portPlain,
|
||||
tlsMode: .normal,
|
||||
tlsConfiguration: nil,
|
||||
authMethods: authMethods,
|
||||
@@ -48,6 +48,8 @@ class TestTLSMode: XCTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
// This test is for a mail server that requires STARTTLS authentication. The current mail server being used for CI builds does not require STARTTLS for non-SSL ports. So this test cannot pass successfully.
|
||||
/*
|
||||
func testIgnoreTLS() {
|
||||
let expectation = self.expectation(description: #function)
|
||||
defer { waitForExpectations(timeout: testDuration) }
|
||||
@@ -57,7 +59,7 @@ class TestTLSMode: XCTestCase {
|
||||
hostname: hostname,
|
||||
email: email,
|
||||
password: password,
|
||||
port: port,
|
||||
port: portPlain,
|
||||
tlsMode: .ignoreTLS,
|
||||
tlsConfiguration: nil,
|
||||
authMethods: authMethods,
|
||||
@@ -75,6 +77,7 @@ class TestTLSMode: XCTestCase {
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
func testRequireTLS() {
|
||||
let expectation = self.expectation(description: #function)
|
||||
@@ -108,7 +111,7 @@ class TestTLSMode: XCTestCase {
|
||||
hostname: hostname,
|
||||
email: email,
|
||||
password: password,
|
||||
port: port,
|
||||
port: portPlain,
|
||||
tlsMode: .requireSTARTTLS,
|
||||
tlsConfiguration: nil,
|
||||
authMethods: authMethods,
|
||||
|
||||
+7
-10
@@ -14,6 +14,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Enumerations" class="dashAnchor"></a>
|
||||
|
||||
<a title="Enumerations Reference"></a>
|
||||
|
||||
@@ -32,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -99,7 +100,7 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Enumerations</h1>
|
||||
<p>The following enumerations are available globally.</p>
|
||||
|
||||
@@ -131,17 +132,13 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">AuthMethod</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">AuthMethod</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -163,7 +160,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SMTPError</span><span class="p">:</span> <span class="kt">Error</span><span class="p">,</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SMTPError</span> <span class="p">:</span> <span class="kt">Error</span><span class="p">,</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -178,8 +175,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+18
-29
@@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -100,11 +100,12 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>AuthMethod</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">AuthMethod</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">AuthMethod</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -120,9 +121,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP10AuthMethodO7cramMD5A2CmF"></a>
|
||||
<a name="/s:9SwiftSMTP10AuthMethodO7cramMD5yA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/cramMD5" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AuthMethodO7cramMD5A2CmF">cramMD5</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AuthMethodO7cramMD5yA2CmF">cramMD5</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -137,23 +138,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">cramMD5</span> <span class="o">=</span> <span class="s">"CRAM-MD5"</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">cramMD5</span> <span class="o">=</span> <span class="s">"CRAM-MD5"</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP10AuthMethodO5loginA2CmF"></a>
|
||||
<a name="/s:9SwiftSMTP10AuthMethodO5loginyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/login" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AuthMethodO5loginA2CmF">login</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AuthMethodO5loginyA2CmF">login</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -168,23 +165,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">login</span> <span class="o">=</span> <span class="s">"LOGIN"</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">login</span> <span class="o">=</span> <span class="s">"LOGIN"</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP10AuthMethodO5plainA2CmF"></a>
|
||||
<a name="/s:9SwiftSMTP10AuthMethodO5plainyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/plain" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AuthMethodO5plainA2CmF">plain</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AuthMethodO5plainyA2CmF">plain</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -199,23 +192,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">plain</span> <span class="o">=</span> <span class="s">"PLAIN"</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">plain</span> <span class="o">=</span> <span class="s">"PLAIN"</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP10AuthMethodO7xoauth2A2CmF"></a>
|
||||
<a name="/s:9SwiftSMTP10AuthMethodO7xoauth2yA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/xoauth2" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AuthMethodO7xoauth2A2CmF">xoauth2</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AuthMethodO7xoauth2yA2CmF">xoauth2</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -230,7 +219,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">xoauth2</span> <span class="o">=</span> <span class="s">"XOAUTH2"</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">xoauth2</span> <span class="o">=</span> <span class="s">"XOAUTH2"</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -245,8 +234,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+43
-82
@@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -100,11 +100,12 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>SMTPError</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SMTPError</span><span class="p">:</span> <span class="kt">Error</span><span class="p">,</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SMTPError</span> <span class="p">:</span> <span class="kt">Error</span><span class="p">,</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -120,9 +121,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO16base64DecodeFailACSS6string_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/base64DecodeFail" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO16base64DecodeFailACSS6string_tcACmF">base64DecodeFail</a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO16base64DecodeFailyACSS_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/base64DecodeFail(string:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO16base64DecodeFailyACSS_tcACmF">base64DecodeFail(string:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -137,23 +138,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="nf">base64DecodeFail</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">base64DecodeFail</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO20md5HashChallengeFailA2CmF"></a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO20md5HashChallengeFailyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/md5HashChallengeFail" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO20md5HashChallengeFailA2CmF">md5HashChallengeFail</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO20md5HashChallengeFailyA2CmF">md5HashChallengeFail</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -168,23 +165,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">md5HashChallengeFail</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">md5HashChallengeFail</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO12fileNotFoundACSS4path_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/fileNotFound" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO12fileNotFoundACSS4path_tcACmF">fileNotFound</a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO12fileNotFoundyACSS_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/fileNotFound(path:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO12fileNotFoundyACSS_tcACmF">fileNotFound(path:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -199,23 +192,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="nf">fileNotFound</span><span class="p">(</span><span class="nv">path</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">fileNotFound</span><span class="p">(</span><span class="nv">path</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO26noAuthMethodsOrRequiresTLSACSS8hostname_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/noAuthMethodsOrRequiresTLS" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO26noAuthMethodsOrRequiresTLSACSS8hostname_tcACmF">noAuthMethodsOrRequiresTLS</a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO26noAuthMethodsOrRequiresTLSyACSS_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/noAuthMethodsOrRequiresTLS(hostname:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO26noAuthMethodsOrRequiresTLSyACSS_tcACmF">noAuthMethodsOrRequiresTLS(hostname:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -230,23 +219,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="nf">noAuthMethodsOrRequiresTLS</span><span class="p">(</span><span class="nv">hostname</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">noAuthMethodsOrRequiresTLS</span><span class="p">(</span><span class="nv">hostname</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO12noRecipientsA2CmF"></a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO12noRecipientsyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/noRecipients" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO12noRecipientsA2CmF">noRecipients</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO12noRecipientsyA2CmF">noRecipients</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -261,23 +246,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">noRecipients</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">noRecipients</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO22createEmailRegexFailedA2CmF"></a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO22createEmailRegexFailedyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/createEmailRegexFailed" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO22createEmailRegexFailedA2CmF">createEmailRegexFailed</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO22createEmailRegexFailedyA2CmF">createEmailRegexFailed</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -292,23 +273,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">createEmailRegexFailed</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">createEmailRegexFailed</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO11badResponseACSS7command_SS8responsetcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/badResponse" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO11badResponseACSS7command_SS8responsetcACmF">badResponse</a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO11badResponseyACSS_SStcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/badResponse(command:response:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO11badResponseyACSS_SStcACmF">badResponse(command:<wbr>response:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -323,23 +300,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="nf">badResponse</span><span class="p">(</span><span class="nv">command</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">response</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">badResponse</span><span class="p">(</span><span class="nv">command</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">response</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO19convertDataUTF8FailAC10Foundation0E0V4data_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/convertDataUTF8Fail" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO19convertDataUTF8FailAC10Foundation0E0V4data_tcACmF">convertDataUTF8Fail</a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO19convertDataUTF8FailyAC10Foundation0E0V_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/convertDataUTF8Fail(data:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO19convertDataUTF8FailyAC10Foundation0E0V_tcACmF">convertDataUTF8Fail(data:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -354,23 +327,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="nf">convertDataUTF8Fail</span><span class="p">(</span><span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">convertDataUTF8Fail</span><span class="p">(</span><span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO12invalidEmailACSS5email_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/invalidEmail" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO12invalidEmailACSS5email_tcACmF">invalidEmail</a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO12invalidEmailyACSS_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/invalidEmail(email:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO12invalidEmailyACSS_tcACmF">invalidEmail(email:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -385,23 +354,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="nf">invalidEmail</span><span class="p">(</span><span class="nv">email</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">invalidEmail</span><span class="p">(</span><span class="nv">email</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO16requiredSTARTTLSA2CmF"></a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO16requiredSTARTTLSyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/requiredSTARTTLS" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO16requiredSTARTTLSA2CmF">requiredSTARTTLS</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO16requiredSTARTTLSyA2CmF">requiredSTARTTLS</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -416,17 +381,13 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">requiredSTARTTLS</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">requiredSTARTTLS</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -447,7 +408,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -462,8 +423,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+11
-21
@@ -14,6 +14,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Structures" class="dashAnchor"></a>
|
||||
|
||||
<a title="Structures Reference"></a>
|
||||
|
||||
@@ -32,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -99,7 +100,7 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Structures</h1>
|
||||
<p>The following structures are available globally.</p>
|
||||
|
||||
@@ -132,17 +133,14 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Attachment</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Attachment</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Attachment</span><span class="p">:</span> <span class="kt">Equatable</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -164,17 +162,13 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Mail</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Mail</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -196,17 +190,13 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SMTP</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SMTP</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -220,7 +210,7 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Configuration for connecting with TLS. For more info, see <a href="https://github.com/IBM-Swift/BlueSSLService">https://github.com/IBM-Swift/BlueSSLService</a>.</p>
|
||||
<p>Configuration for connecting with TLS. For more info, see <a href="https://github.com/Kitura/BlueSSLService">https://github.com/Kitura/BlueSSLService</a>.</p>
|
||||
|
||||
<a href="Structs/TLSConfiguration.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
@@ -228,7 +218,7 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">TLSConfiguration</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">TLSConfiguration</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -243,8 +233,8 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -100,11 +100,13 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Attachment</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Attachment</span></code></pre>
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Attachment</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Attachment</span><span class="p">:</span> <span class="kt">Equatable</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -121,9 +123,9 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP10AttachmentVAC10Foundation4DataV4data_SS4mimeSS4nameSb6inlines10DictionaryVyS2SG17additionalHeadersSayACG18relatedAttachmentstcfc"></a>
|
||||
<a name="/s:9SwiftSMTP10AttachmentV4data4mime4name6inline17additionalHeaders18relatedAttachmentsAC10Foundation4DataV_S2SSbSDyS2SGSayACGtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(data:mime:name:inline:additionalHeaders:relatedAttachments:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AttachmentVAC10Foundation4DataV4data_SS4mimeSS4nameSb6inlines10DictionaryVyS2SG17additionalHeadersSayACG18relatedAttachmentstcfc">init(data:mime:name:inline:additionalHeaders:relatedAttachments:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AttachmentV4data4mime4name6inline17additionalHeaders18relatedAttachmentsAC10Foundation4DataV_S2SSbSDyS2SGSayACGtcfc">init(data:<wbr>mime:<wbr>name:<wbr>inline:<wbr>additionalHeaders:<wbr>relatedAttachments:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -138,7 +140,7 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">,</span>
|
||||
<span class="nv">mime</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<span class="nv">inline</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span>
|
||||
@@ -239,9 +241,9 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP10AttachmentVACSS8filePath_SS4mimeSSSg4nameSb6inlines10DictionaryVyS2SG17additionalHeadersSayACG18relatedAttachmentstcfc"></a>
|
||||
<a name="/s:9SwiftSMTP10AttachmentV8filePath4mime4name6inline17additionalHeaders18relatedAttachmentsACSS_S2SSgSbSDyS2SGSayACGtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(filePath:mime:name:inline:additionalHeaders:relatedAttachments:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AttachmentVACSS8filePath_SS4mimeSSSg4nameSb6inlines10DictionaryVyS2SG17additionalHeadersSayACG18relatedAttachmentstcfc">init(filePath:mime:name:inline:additionalHeaders:relatedAttachments:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AttachmentV8filePath4mime4name6inline17additionalHeaders18relatedAttachmentsACSS_S2SSgSbSDyS2SGSayACGtcfc">init(filePath:<wbr>mime:<wbr>name:<wbr>inline:<wbr>additionalHeaders:<wbr>relatedAttachments:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -256,7 +258,7 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">filePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">filePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<span class="nv">mime</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="s">"application/octet-stream"</span><span class="p">,</span>
|
||||
<span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
|
||||
<span class="nv">inline</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span>
|
||||
@@ -357,9 +359,9 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP10AttachmentVACSS11htmlContent_SS12characterSetSb11alternatives10DictionaryVyS2SG17additionalHeadersSayACG18relatedAttachmentstcfc"></a>
|
||||
<a name="/s:9SwiftSMTP10AttachmentV11htmlContent12characterSet11alternative17additionalHeaders18relatedAttachmentsACSS_SSSbSDyS2SGSayACGtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(htmlContent:characterSet:alternative:additionalHeaders:relatedAttachments:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AttachmentVACSS11htmlContent_SS12characterSetSb11alternatives10DictionaryVyS2SG17additionalHeadersSayACG18relatedAttachmentstcfc">init(htmlContent:characterSet:alternative:additionalHeaders:relatedAttachments:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AttachmentV11htmlContent12characterSet11alternative17additionalHeaders18relatedAttachmentsACSS_SSSbSDyS2SGSayACGtcfc">init(htmlContent:<wbr>characterSet:<wbr>alternative:<wbr>additionalHeaders:<wbr>relatedAttachments:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -374,7 +376,7 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">htmlContent</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">htmlContent</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<span class="nv">characterSet</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="s">"utf-8"</span><span class="p">,</span>
|
||||
<span class="nv">alternative</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">,</span>
|
||||
<span class="nv">additionalHeaders</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">:</span> <span class="kt">String</span><span class="p">]</span> <span class="o">=</span> <span class="p">[:],</span>
|
||||
@@ -457,16 +459,12 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP10AttachmentV2eeoiSbAC_ACtFZ"></a>
|
||||
<a name="/s:9SwiftSMTP10AttachmentV2eeoiySbAC_ACtFZ"></a>
|
||||
<a name="//apple_ref/swift/Method/==(_:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AttachmentV2eeoiSbAC_ACtFZ">==(_:_:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AttachmentV2eeoiySbAC_ACtFZ">==(_:<wbr>_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -481,7 +479,7 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="o">==</span><span class="p">(</span><span class="nv">lhs</span><span class="p">:</span> <span class="kt">Attachment</span><span class="p">,</span> <span class="nv">rhs</span><span class="p">:</span> <span class="kt">Attachment</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="o">==</span> <span class="p">(</span><span class="nv">lhs</span><span class="p">:</span> <span class="kt">Attachment</span><span class="p">,</span> <span class="nv">rhs</span><span class="p">:</span> <span class="kt">Attachment</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Bool</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -496,8 +494,8 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+24
-27
@@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -100,11 +100,12 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Mail</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Mail</span></code></pre>
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Mail</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -137,7 +138,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">uuid</span> <span class="o">=</span> <span class="kt">UUID</span><span class="p">()</span><span class="o">.</span><span class="n">uuidString</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">uuid</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -164,7 +165,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">from</span><span class="p">:</span> <span class="kt"><a href="../Structs/Mail/User.html">User</a></span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">from</span><span class="p">:</span> <span class="kt"><a href="../Structs/Mail/User.html">User</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -191,7 +192,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">to</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">]</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">to</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">]</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -218,7 +219,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">cc</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">]</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">cc</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">]</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -245,7 +246,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">bcc</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">]</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">bcc</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">]</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -272,7 +273,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">subject</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">subject</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -299,7 +300,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">text</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">text</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -327,7 +328,7 @@ text, the last one will be used as the alternative (all the <code>Attachments</c
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">attachments</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Attachment.html">Attachment</a></span><span class="p">]</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">attachments</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Attachment.html">Attachment</a></span><span class="p">]</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -354,7 +355,7 @@ text, the last one will be used as the alternative (all the <code>Attachments</c
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">alternative</span><span class="p">:</span> <span class="kt"><a href="../Structs/Attachment.html">Attachment</a></span><span class="p">?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">alternative</span><span class="p">:</span> <span class="kt"><a href="../Structs/Attachment.html">Attachment</a></span><span class="p">?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -364,9 +365,9 @@ text, the last one will be used as the alternative (all the <code>Attachments</c
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP4MailV17additionalHeaderss10DictionaryVyS2SGvp"></a>
|
||||
<a name="/s:9SwiftSMTP4MailV17additionalHeadersSDyS2SGvp"></a>
|
||||
<a name="//apple_ref/swift/Property/additionalHeaders" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP4MailV17additionalHeaderss10DictionaryVyS2SGvp">additionalHeaders</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP4MailV17additionalHeadersSDyS2SGvp">additionalHeaders</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -382,7 +383,7 @@ Defaults to none. The following will be ignored: CONTENT-TYPE, CONTENT-DISPOSITI
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">additionalHeaders</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">:</span> <span class="kt">String</span><span class="p">]</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">additionalHeaders</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span> <span class="p">:</span> <span class="kt">String</span><span class="p">]</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -409,7 +410,7 @@ Defaults to none. The following will be ignored: CONTENT-TYPE, CONTENT-DISPOSITI
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">id</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">id</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -436,7 +437,7 @@ Defaults to none. The following will be ignored: CONTENT-TYPE, CONTENT-DISPOSITI
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">hostname</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">hostname</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -446,9 +447,9 @@ Defaults to none. The following will be ignored: CONTENT-TYPE, CONTENT-DISPOSITI
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP4MailVA2C4UserV4from_SayAEG2toAG2ccAG3bccSS7subjectSS4textSayAA10AttachmentVG11attachmentss10DictionaryVyS2SG17additionalHeaderstcfc"></a>
|
||||
<a name="/s:9SwiftSMTP4MailV4from2to2cc3bcc7subject4text11attachments17additionalHeadersA2C4UserV_SayAMGA2NS2SSayAA10AttachmentVGSDyS2SGtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(from:to:cc:bcc:subject:text:attachments:additionalHeaders:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP4MailVA2C4UserV4from_SayAEG2toAG2ccAG3bccSS7subjectSS4textSayAA10AttachmentVG11attachmentss10DictionaryVyS2SG17additionalHeaderstcfc">init(from:to:cc:bcc:subject:text:attachments:additionalHeaders:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP4MailV4from2to2cc3bcc7subject4text11attachments17additionalHeadersA2C4UserV_SayAMGA2NS2SSayAA10AttachmentVGSDyS2SGtcfc">init(from:<wbr>to:<wbr>cc:<wbr>bcc:<wbr>subject:<wbr>text:<wbr>attachments:<wbr>additionalHeaders:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -463,7 +464,7 @@ Defaults to none. The following will be ignored: CONTENT-TYPE, CONTENT-DISPOSITI
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">from</span><span class="p">:</span> <span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">from</span><span class="p">:</span> <span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">,</span>
|
||||
<span class="nv">to</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">],</span>
|
||||
<span class="nv">cc</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">]</span> <span class="o">=</span> <span class="p">[],</span>
|
||||
<span class="nv">bcc</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">]</span> <span class="o">=</span> <span class="p">[],</span>
|
||||
@@ -584,10 +585,6 @@ CONTENT-TRANSFER-ENCODING.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -609,7 +606,7 @@ CONTENT-TRANSFER-ENCODING.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">User</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">User</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -624,8 +621,8 @@ CONTENT-TRANSFER-ENCODING.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+11
-10
@@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="../../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -100,11 +100,12 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>User</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">User</span></code></pre>
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">User</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -137,7 +138,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -164,7 +165,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">email</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">email</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -174,9 +175,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP4MailV4UserVAESSSg4name_SS5emailtcfc"></a>
|
||||
<a name="/s:9SwiftSMTP4MailV4UserV4name5emailAESSSg_SStcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(name:email:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP4MailV4UserVAESSSg4name_SS5emailtcfc">init(name:email:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP4MailV4UserV4name5emailAESSSg_SStcfc">init(name:<wbr>email:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -191,7 +192,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">email</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">email</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -237,8 +238,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+16
-15
@@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -100,11 +100,12 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>SMTP</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SMTP</span></code></pre>
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SMTP</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -138,7 +139,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TLSMode</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TLSMode</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -148,9 +149,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP0B0VACSS8hostname_SS5emailSS8passwords5Int32V4portAC7TLSModeO7tlsModeAA16TLSConfigurationVSg0I13ConfigurationSayAA10AuthMethodOG11authMethodsSS10domainNameSu7timeouttcfc"></a>
|
||||
<a name="/s:9SwiftSMTP0B0V8hostname5email8password4port7tlsMode0G13Configuration11authMethods10domainName7timeoutACSS_S2Ss5Int32VAC7TLSModeOAA16TLSConfigurationVSgSayAA10AuthMethodOGSSSutcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(hostname:email:password:port:tlsMode:tlsConfiguration:authMethods:domainName:timeout:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0VACSS8hostname_SS5emailSS8passwords5Int32V4portAC7TLSModeO7tlsModeAA16TLSConfigurationVSg0I13ConfigurationSayAA10AuthMethodOG11authMethodsSS10domainNameSu7timeouttcfc">init(hostname:email:password:port:tlsMode:tlsConfiguration:authMethods:domainName:timeout:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V8hostname5email8password4port7tlsMode0G13Configuration11authMethods10domainName7timeoutACSS_S2Ss5Int32VAC7TLSModeOAA16TLSConfigurationVSgSayAA10AuthMethodOGSSSutcfc">init(hostname:<wbr>email:<wbr>password:<wbr>port:<wbr>tlsMode:<wbr>tlsConfiguration:<wbr>authMethods:<wbr>domainName:<wbr>timeout:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -176,7 +177,7 @@ IPv6, then timeout, and fall back to IPv4. You can avoid this by disabling IPv6
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">hostname</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">hostname</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<span class="nv">email</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<span class="nv">password</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<span class="nv">port</span><span class="p">:</span> <span class="kt">Int32</span> <span class="o">=</span> <span class="mi">587</span><span class="p">,</span>
|
||||
@@ -310,9 +311,9 @@ certificates is used. See <code><a href="../Structs/TLSConfiguration.html">TLSCo
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP0B0V4sendyAA4MailV_ys5Error_pSgcSg10completiontF"></a>
|
||||
<a name="/s:9SwiftSMTP0B0V4send_10completionyAA4MailV_ys5Error_pSgcSgtF"></a>
|
||||
<a name="//apple_ref/swift/Method/send(_:completion:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V4sendyAA4MailV_ys5Error_pSgcSg10completiontF">send(_:completion:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V4send_10completionyAA4MailV_ys5Error_pSgcSgtF">send(_:<wbr>completion:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -327,7 +328,7 @@ certificates is used. See <code><a href="../Structs/TLSConfiguration.html">TLSCo
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">send</span><span class="p">(</span><span class="n">_</span> <span class="nv">mail</span><span class="p">:</span> <span class="kt"><a href="../Structs/Mail.html">Mail</a></span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">((</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">send</span><span class="p">(</span><span class="n">_</span> <span class="nv">mail</span><span class="p">:</span> <span class="kt"><a href="../Structs/Mail.html">Mail</a></span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">((</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -368,9 +369,9 @@ certificates is used. See <code><a href="../Structs/TLSConfiguration.html">TLSCo
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP0B0V4sendySayAA4MailVG_yAF_s5Error_pSgtcSg8progressyAG_SayAF_sAH_ptGtcSg10completiontF"></a>
|
||||
<a name="/s:9SwiftSMTP0B0V4send_8progress10completionySayAA4MailVG_yAH_s5Error_pSgtcSgyAI_SayAH_sAJ_ptGtcSgtF"></a>
|
||||
<a name="//apple_ref/swift/Method/send(_:progress:completion:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V4sendySayAA4MailVG_yAF_s5Error_pSgtcSg8progressyAG_SayAF_sAH_ptGtcSg10completiontF">send(_:progress:completion:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V4send_8progress10completionySayAA4MailVG_yAH_s5Error_pSgtcSgyAI_SayAH_sAJ_ptGtcSgtF">send(_:<wbr>progress:<wbr>completion:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -401,7 +402,7 @@ in separate calls to <code>send</code>.</li>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">send</span><span class="p">(</span><span class="n">_</span> <span class="nv">mails</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail.html">Mail</a></span><span class="p">],</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">send</span><span class="p">(</span><span class="n">_</span> <span class="nv">mails</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail.html">Mail</a></span><span class="p">],</span>
|
||||
<span class="nv">progress</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:9SwiftSMTP8Progressa">Progress</a></span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
|
||||
<span class="nv">completion</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:9SwiftSMTP10Completiona">Completion</a></span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
||||
|
||||
@@ -464,8 +465,8 @@ corresponding <code>Error</code>s. (optional)</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="../../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -100,11 +100,12 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>TLSMode</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TLSMode</span></code></pre>
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TLSMode</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -120,9 +121,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP0B0V7TLSModeO6normalA2EmF"></a>
|
||||
<a name="/s:9SwiftSMTP0B0V7TLSModeO6normalyA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/normal" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V7TLSModeO6normalA2EmF">normal</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V7TLSModeO6normalyA2EmF">normal</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -137,23 +138,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">normal</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">normal</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP0B0V7TLSModeO9ignoreTLSA2EmF"></a>
|
||||
<a name="/s:9SwiftSMTP0B0V7TLSModeO9ignoreTLSyA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/ignoreTLS" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V7TLSModeO9ignoreTLSA2EmF">ignoreTLS</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V7TLSModeO9ignoreTLSyA2EmF">ignoreTLS</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -168,23 +165,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">ignoreTLS</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">ignoreTLS</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP0B0V7TLSModeO10requireTLSA2EmF"></a>
|
||||
<a name="/s:9SwiftSMTP0B0V7TLSModeO10requireTLSyA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/requireTLS" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V7TLSModeO10requireTLSA2EmF">requireTLS</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V7TLSModeO10requireTLSyA2EmF">requireTLS</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -199,23 +192,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">requireTLS</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">requireTLS</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP0B0V7TLSModeO15requireSTARTTLSA2EmF"></a>
|
||||
<a name="/s:9SwiftSMTP0B0V7TLSModeO15requireSTARTTLSyA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/requireSTARTTLS" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V7TLSModeO15requireSTARTTLSA2EmF">requireSTARTTLS</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V7TLSModeO15requireSTARTTLSyA2EmF">requireSTARTTLS</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -230,7 +219,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">requireSTARTTLS</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">requireSTARTTLS</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -245,8 +234,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -100,15 +100,16 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>TLSConfiguration</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">TLSConfiguration</span></code></pre>
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">TLSConfiguration</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Configuration for connecting with TLS. For more info, see <a href="https://github.com/IBM-Swift/BlueSSLService">https://github.com/IBM-Swift/BlueSSLService</a>.</p>
|
||||
<p>Configuration for connecting with TLS. For more info, see <a href="https://github.com/Kitura/BlueSSLService">https://github.com/Kitura/BlueSSLService</a>.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@@ -120,9 +121,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP16TLSConfigurationVACSSSg15withCipherSuite_Sb34clientAllowsSelfSignedCertificatestcfc"></a>
|
||||
<a name="/s:9SwiftSMTP16TLSConfigurationV15withCipherSuite34clientAllowsSelfSignedCertificatesACSSSg_Sbtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(withCipherSuite:clientAllowsSelfSignedCertificates:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP16TLSConfigurationVACSSSg15withCipherSuite_Sb34clientAllowsSelfSignedCertificatestcfc">init(withCipherSuite:clientAllowsSelfSignedCertificates:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP16TLSConfigurationV15withCipherSuite34clientAllowsSelfSignedCertificatesACSSSg_Sbtcfc">init(withCipherSuite:<wbr>clientAllowsSelfSignedCertificates:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -137,7 +138,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">withCipherSuite</span> <span class="nv">cipherSuite</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">withCipherSuite</span> <span class="nv">cipherSuite</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
|
||||
<span class="nv">clientAllowsSelfSignedCertificates</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
@@ -179,9 +180,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP16TLSConfigurationVACSSSg25withCACertificateFilePath_AD016usingCertificateF0AD0d3KeyF0Sb0H15SelfSignedCertsAD11cipherSuitetcfc"></a>
|
||||
<a name="/s:9SwiftSMTP16TLSConfigurationV25withCACertificateFilePath016usingCertificateF00d3KeyF00H15SelfSignedCerts11cipherSuiteACSSSg_A2ISbAItcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(withCACertificateFilePath:usingCertificateFile:withKeyFile:usingSelfSignedCerts:cipherSuite:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP16TLSConfigurationVACSSSg25withCACertificateFilePath_AD016usingCertificateF0AD0d3KeyF0Sb0H15SelfSignedCertsAD11cipherSuitetcfc">init(withCACertificateFilePath:usingCertificateFile:withKeyFile:usingSelfSignedCerts:cipherSuite:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP16TLSConfigurationV25withCACertificateFilePath016usingCertificateF00d3KeyF00H15SelfSignedCerts11cipherSuiteACSSSg_A2ISbAItcfc">init(withCACertificateFilePath:<wbr>usingCertificateFile:<wbr>withKeyFile:<wbr>usingSelfSignedCerts:<wbr>cipherSuite:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -196,7 +197,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">withCACertificateFilePath</span> <span class="nv">caCertificateFilePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">withCACertificateFilePath</span> <span class="nv">caCertificateFilePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||||
<span class="n">usingCertificateFile</span> <span class="nv">certificateFilePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||||
<span class="n">withKeyFile</span> <span class="nv">keyFilePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
|
||||
<span class="n">usingSelfSignedCerts</span> <span class="nv">selfSigned</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">,</span>
|
||||
@@ -277,9 +278,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP16TLSConfigurationVACSSSg26withCACertificateDirectory_AD20usingCertificateFileAD0d3KeyI0Sb0G15SelfSignedCertsAD11cipherSuitetcfc"></a>
|
||||
<a name="/s:9SwiftSMTP16TLSConfigurationV26withCACertificateDirectory20usingCertificateFile0d3KeyI00G15SelfSignedCerts11cipherSuiteACSSSg_A2ISbAItcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(withCACertificateDirectory:usingCertificateFile:withKeyFile:usingSelfSignedCerts:cipherSuite:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP16TLSConfigurationVACSSSg26withCACertificateDirectory_AD20usingCertificateFileAD0d3KeyI0Sb0G15SelfSignedCertsAD11cipherSuitetcfc">init(withCACertificateDirectory:usingCertificateFile:withKeyFile:usingSelfSignedCerts:cipherSuite:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP16TLSConfigurationV26withCACertificateDirectory20usingCertificateFile0d3KeyI00G15SelfSignedCerts11cipherSuiteACSSSg_A2ISbAItcfc">init(withCACertificateDirectory:<wbr>usingCertificateFile:<wbr>withKeyFile:<wbr>usingSelfSignedCerts:<wbr>cipherSuite:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -296,7 +297,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">withCACertificateDirectory</span> <span class="nv">caCertificateDirPath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">withCACertificateDirectory</span> <span class="nv">caCertificateDirPath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||||
<span class="n">usingCertificateFile</span> <span class="nv">certificateFilePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||||
<span class="n">withKeyFile</span> <span class="nv">keyFilePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
|
||||
<span class="n">usingSelfSignedCerts</span> <span class="nv">selfSigned</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">,</span>
|
||||
@@ -377,9 +378,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP16TLSConfigurationVACSSSg17withChainFilePath_AD0D8PasswordSb20usingSelfSignedCertsSb012clientAllowsjK12CertificatesAD11cipherSuitetcfc"></a>
|
||||
<a name="/s:9SwiftSMTP16TLSConfigurationV17withChainFilePath0D8Password20usingSelfSignedCerts012clientAllowsjK12Certificates11cipherSuiteACSSSg_AIS2bAItcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(withChainFilePath:withPassword:usingSelfSignedCerts:clientAllowsSelfSignedCertificates:cipherSuite:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP16TLSConfigurationVACSSSg17withChainFilePath_AD0D8PasswordSb20usingSelfSignedCertsSb012clientAllowsjK12CertificatesAD11cipherSuitetcfc">init(withChainFilePath:withPassword:usingSelfSignedCerts:clientAllowsSelfSignedCertificates:cipherSuite:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP16TLSConfigurationV17withChainFilePath0D8Password20usingSelfSignedCerts012clientAllowsjK12Certificates11cipherSuiteACSSSg_AIS2bAItcfc">init(withChainFilePath:<wbr>withPassword:<wbr>usingSelfSignedCerts:<wbr>clientAllowsSelfSignedCertificates:<wbr>cipherSuite:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -396,7 +397,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">withChainFilePath</span> <span class="nv">chainFilePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">withChainFilePath</span> <span class="nv">chainFilePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||||
<span class="n">withPassword</span> <span class="nv">password</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
|
||||
<span class="n">usingSelfSignedCerts</span> <span class="nv">selfSigned</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">,</span>
|
||||
<span class="nv">clientAllowsSelfSignedCertificates</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span>
|
||||
@@ -444,6 +445,18 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>clientAllowsSelfSignedCertificates</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>True if, as a client, connections to self-signed servers are allowed</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
@@ -467,7 +480,7 @@
|
||||
<code>
|
||||
<a name="/"></a>
|
||||
<a name="//apple_ref/swift/Method/init(withPEMCertificateString:usingSelfSignedCerts:cipherSuite:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/">init(withPEMCertificateString:usingSelfSignedCerts:cipherSuite:)</a>
|
||||
<a class="token" href="#/">init(withPEMCertificateString:<wbr>usingSelfSignedCerts:<wbr>cipherSuite:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -489,8 +502,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Type Aliases" class="dashAnchor"></a>
|
||||
|
||||
<a title="Type Aliases Reference"></a>
|
||||
|
||||
@@ -32,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -99,7 +100,7 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Type Aliases</h1>
|
||||
<p>The following type aliases are available globally.</p>
|
||||
|
||||
@@ -130,7 +131,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Progress</span> <span class="o">=</span> <span class="p">((</span><span class="kt"><a href="Structs/Mail.html">Mail</a></span><span class="p">,</span> <span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Progress</span> <span class="o">=</span> <span class="p">((</span><span class="kt"><a href="Structs/Mail.html">Mail</a></span><span class="p">,</span> <span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -158,7 +159,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Completion</span> <span class="o">=</span> <span class="p">(([</span><span class="kt"><a href="Structs/Mail.html">Mail</a></span><span class="p">],</span> <span class="p">[(</span><span class="kt"><a href="Structs/Mail.html">Mail</a></span><span class="p">,</span> <span class="kt">Error</span><span class="p">)])</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Completion</span> <span class="o">=</span> <span class="p">(([</span><span class="kt"><a href="Structs/Mail.html">Mail</a></span><span class="p">],</span> <span class="p">[(</span><span class="kt"><a href="Structs/Mail.html">Mail</a></span><span class="p">,</span> <span class="kt">Error</span><span class="p">)])</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -173,8 +174,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+36
-9
@@ -63,6 +63,10 @@ a {
|
||||
a:hover, a:focus {
|
||||
outline: 0;
|
||||
text-decoration: underline; }
|
||||
a.discouraged {
|
||||
text-decoration: line-through; }
|
||||
a.discouraged:hover, a.discouraged:focus {
|
||||
text-decoration: underline line-through; }
|
||||
|
||||
table {
|
||||
background: #fff;
|
||||
@@ -90,10 +94,10 @@ pre {
|
||||
code {
|
||||
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; }
|
||||
|
||||
p > code, li > code {
|
||||
.item-container p > code, .item-container li > code, .top-matter p > code, .top-matter li > code {
|
||||
background: #f7f7f7;
|
||||
padding: .2em; }
|
||||
p > code:before, p > code:after, li > code:before, li > code:after {
|
||||
.item-container p > code:before, .item-container p > code:after, .item-container li > code:before, .item-container li > code:after, .top-matter p > code:before, .top-matter p > code:after, .top-matter li > code:before, .top-matter li > code:after {
|
||||
letter-spacing: -.2em;
|
||||
content: "\00a0"; }
|
||||
|
||||
@@ -107,7 +111,6 @@ pre code {
|
||||
@media (min-width: 768px) {
|
||||
.content-wrapper {
|
||||
flex-direction: row; } }
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
padding: 8px;
|
||||
@@ -153,7 +156,6 @@ pre code {
|
||||
word-wrap: normal;
|
||||
background: #fbfbfb;
|
||||
border-right: 1px solid #ddd; } }
|
||||
|
||||
.nav-groups {
|
||||
list-style-type: none;
|
||||
padding-left: 0; }
|
||||
@@ -184,7 +186,6 @@ pre code {
|
||||
order: 2;
|
||||
flex: 1;
|
||||
padding-bottom: 60px; } }
|
||||
|
||||
.section {
|
||||
padding: 0 32px;
|
||||
border-bottom: 1px solid #ddd; }
|
||||
@@ -197,6 +198,8 @@ pre code {
|
||||
.section-name {
|
||||
color: #666;
|
||||
display: block; }
|
||||
.section-name p {
|
||||
margin-bottom: inherit; }
|
||||
|
||||
.declaration .highlight {
|
||||
overflow-x: initial;
|
||||
@@ -215,6 +218,22 @@ pre code {
|
||||
content: "";
|
||||
display: block; }
|
||||
|
||||
.section-name-container {
|
||||
position: relative; }
|
||||
.section-name-container .section-name-link {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
margin-bottom: 0; }
|
||||
.section-name-container .section-name {
|
||||
position: relative;
|
||||
pointer-events: none;
|
||||
z-index: 1; }
|
||||
.section-name-container .section-name a {
|
||||
pointer-events: auto; }
|
||||
|
||||
.item-container {
|
||||
padding: 0; }
|
||||
|
||||
@@ -225,9 +244,11 @@ pre code {
|
||||
.item a[name]:before {
|
||||
content: "";
|
||||
display: block; }
|
||||
.item .token {
|
||||
.item .token, .item .direct-link {
|
||||
display: inline-block;
|
||||
text-indent: -20px;
|
||||
padding-left: 3px;
|
||||
margin-left: 0px;
|
||||
margin-left: 20px;
|
||||
font-size: 1rem; }
|
||||
.item .declaration-note {
|
||||
font-size: .85em;
|
||||
@@ -287,9 +308,9 @@ pre code {
|
||||
.language .aside-title {
|
||||
color: #4183c4; }
|
||||
|
||||
.aside-warning {
|
||||
.aside-warning, .aside-deprecated, .aside-unavailable {
|
||||
border-left: 5px solid #ff6666; }
|
||||
.aside-warning .aside-title {
|
||||
.aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title {
|
||||
color: #ff0000; }
|
||||
|
||||
.graybox {
|
||||
@@ -325,6 +346,7 @@ pre code {
|
||||
|
||||
html.dash .header, html.dash .breadcrumbs, html.dash .navigation {
|
||||
display: none; }
|
||||
|
||||
html.dash .height-container {
|
||||
display: block; }
|
||||
|
||||
@@ -338,14 +360,17 @@ form[role=search] input {
|
||||
border-radius: 1em; }
|
||||
.loading form[role=search] input {
|
||||
background: white url(../img/spinner.gif) center right 4px no-repeat; }
|
||||
|
||||
form[role=search] .tt-menu {
|
||||
margin: 0;
|
||||
min-width: 300px;
|
||||
background: #fbfbfb;
|
||||
color: #333;
|
||||
border: 1px solid #ddd; }
|
||||
|
||||
form[role=search] .tt-highlight {
|
||||
font-weight: bold; }
|
||||
|
||||
form[role=search] .tt-suggestion {
|
||||
font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
padding: 0 8px; }
|
||||
@@ -358,11 +383,13 @@ form[role=search] .tt-suggestion {
|
||||
font-weight: normal;
|
||||
font-size: 0.9em;
|
||||
padding-left: 16px; }
|
||||
|
||||
form[role=search] .tt-suggestion:hover,
|
||||
form[role=search] .tt-suggestion.tt-cursor {
|
||||
cursor: pointer;
|
||||
background-color: #4183c4;
|
||||
color: #fff; }
|
||||
|
||||
form[role=search] .tt-suggestion:hover .doc-parent-name,
|
||||
form[role=search] .tt-suggestion.tt-cursor .doc-parent-name {
|
||||
color: #fff; }
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Enumerations" class="dashAnchor"></a>
|
||||
|
||||
<a title="Enumerations Reference"></a>
|
||||
|
||||
@@ -32,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -99,7 +100,7 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Enumerations</h1>
|
||||
<p>The following enumerations are available globally.</p>
|
||||
|
||||
@@ -131,17 +132,13 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">AuthMethod</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">AuthMethod</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -163,7 +160,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SMTPError</span><span class="p">:</span> <span class="kt">Error</span><span class="p">,</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SMTPError</span> <span class="p">:</span> <span class="kt">Error</span><span class="p">,</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -178,8 +175,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -100,11 +100,12 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>AuthMethod</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">AuthMethod</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">AuthMethod</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -120,9 +121,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP10AuthMethodO7cramMD5A2CmF"></a>
|
||||
<a name="/s:9SwiftSMTP10AuthMethodO7cramMD5yA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/cramMD5" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AuthMethodO7cramMD5A2CmF">cramMD5</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AuthMethodO7cramMD5yA2CmF">cramMD5</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -137,23 +138,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">cramMD5</span> <span class="o">=</span> <span class="s">"CRAM-MD5"</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">cramMD5</span> <span class="o">=</span> <span class="s">"CRAM-MD5"</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP10AuthMethodO5loginA2CmF"></a>
|
||||
<a name="/s:9SwiftSMTP10AuthMethodO5loginyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/login" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AuthMethodO5loginA2CmF">login</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AuthMethodO5loginyA2CmF">login</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -168,23 +165,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">login</span> <span class="o">=</span> <span class="s">"LOGIN"</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">login</span> <span class="o">=</span> <span class="s">"LOGIN"</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP10AuthMethodO5plainA2CmF"></a>
|
||||
<a name="/s:9SwiftSMTP10AuthMethodO5plainyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/plain" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AuthMethodO5plainA2CmF">plain</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AuthMethodO5plainyA2CmF">plain</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -199,23 +192,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">plain</span> <span class="o">=</span> <span class="s">"PLAIN"</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">plain</span> <span class="o">=</span> <span class="s">"PLAIN"</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP10AuthMethodO7xoauth2A2CmF"></a>
|
||||
<a name="/s:9SwiftSMTP10AuthMethodO7xoauth2yA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/xoauth2" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AuthMethodO7xoauth2A2CmF">xoauth2</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AuthMethodO7xoauth2yA2CmF">xoauth2</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -230,7 +219,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">xoauth2</span> <span class="o">=</span> <span class="s">"XOAUTH2"</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">xoauth2</span> <span class="o">=</span> <span class="s">"XOAUTH2"</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -245,8 +234,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -100,11 +100,12 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>SMTPError</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SMTPError</span><span class="p">:</span> <span class="kt">Error</span><span class="p">,</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SMTPError</span> <span class="p">:</span> <span class="kt">Error</span><span class="p">,</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -120,9 +121,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO16base64DecodeFailACSS6string_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/base64DecodeFail" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO16base64DecodeFailACSS6string_tcACmF">base64DecodeFail</a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO16base64DecodeFailyACSS_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/base64DecodeFail(string:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO16base64DecodeFailyACSS_tcACmF">base64DecodeFail(string:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -137,23 +138,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="nf">base64DecodeFail</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">base64DecodeFail</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO20md5HashChallengeFailA2CmF"></a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO20md5HashChallengeFailyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/md5HashChallengeFail" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO20md5HashChallengeFailA2CmF">md5HashChallengeFail</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO20md5HashChallengeFailyA2CmF">md5HashChallengeFail</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -168,23 +165,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">md5HashChallengeFail</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">md5HashChallengeFail</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO12fileNotFoundACSS4path_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/fileNotFound" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO12fileNotFoundACSS4path_tcACmF">fileNotFound</a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO12fileNotFoundyACSS_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/fileNotFound(path:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO12fileNotFoundyACSS_tcACmF">fileNotFound(path:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -199,23 +192,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="nf">fileNotFound</span><span class="p">(</span><span class="nv">path</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">fileNotFound</span><span class="p">(</span><span class="nv">path</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO26noAuthMethodsOrRequiresTLSACSS8hostname_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/noAuthMethodsOrRequiresTLS" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO26noAuthMethodsOrRequiresTLSACSS8hostname_tcACmF">noAuthMethodsOrRequiresTLS</a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO26noAuthMethodsOrRequiresTLSyACSS_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/noAuthMethodsOrRequiresTLS(hostname:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO26noAuthMethodsOrRequiresTLSyACSS_tcACmF">noAuthMethodsOrRequiresTLS(hostname:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -230,23 +219,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="nf">noAuthMethodsOrRequiresTLS</span><span class="p">(</span><span class="nv">hostname</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">noAuthMethodsOrRequiresTLS</span><span class="p">(</span><span class="nv">hostname</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO12noRecipientsA2CmF"></a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO12noRecipientsyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/noRecipients" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO12noRecipientsA2CmF">noRecipients</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO12noRecipientsyA2CmF">noRecipients</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -261,23 +246,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">noRecipients</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">noRecipients</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO22createEmailRegexFailedA2CmF"></a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO22createEmailRegexFailedyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/createEmailRegexFailed" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO22createEmailRegexFailedA2CmF">createEmailRegexFailed</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO22createEmailRegexFailedyA2CmF">createEmailRegexFailed</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -292,23 +273,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">createEmailRegexFailed</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">createEmailRegexFailed</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO11badResponseACSS7command_SS8responsetcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/badResponse" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO11badResponseACSS7command_SS8responsetcACmF">badResponse</a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO11badResponseyACSS_SStcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/badResponse(command:response:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO11badResponseyACSS_SStcACmF">badResponse(command:<wbr>response:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -323,23 +300,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="nf">badResponse</span><span class="p">(</span><span class="nv">command</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">response</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">badResponse</span><span class="p">(</span><span class="nv">command</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">response</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO19convertDataUTF8FailAC10Foundation0E0V4data_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/convertDataUTF8Fail" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO19convertDataUTF8FailAC10Foundation0E0V4data_tcACmF">convertDataUTF8Fail</a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO19convertDataUTF8FailyAC10Foundation0E0V_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/convertDataUTF8Fail(data:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO19convertDataUTF8FailyAC10Foundation0E0V_tcACmF">convertDataUTF8Fail(data:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -354,23 +327,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="nf">convertDataUTF8Fail</span><span class="p">(</span><span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">convertDataUTF8Fail</span><span class="p">(</span><span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO12invalidEmailACSS5email_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/invalidEmail" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO12invalidEmailACSS5email_tcACmF">invalidEmail</a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO12invalidEmailyACSS_tcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/invalidEmail(email:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO12invalidEmailyACSS_tcACmF">invalidEmail(email:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -385,23 +354,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="nf">invalidEmail</span><span class="p">(</span><span class="nv">email</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">invalidEmail</span><span class="p">(</span><span class="nv">email</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO16requiredSTARTTLSA2CmF"></a>
|
||||
<a name="/s:9SwiftSMTP9SMTPErrorO16requiredSTARTTLSyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/requiredSTARTTLS" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO16requiredSTARTTLSA2CmF">requiredSTARTTLS</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP9SMTPErrorO16requiredSTARTTLSyA2CmF">requiredSTARTTLS</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -416,17 +381,13 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">requiredSTARTTLS</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">requiredSTARTTLS</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -447,7 +408,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -462,8 +423,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Structures" class="dashAnchor"></a>
|
||||
|
||||
<a title="Structures Reference"></a>
|
||||
|
||||
@@ -32,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -99,7 +100,7 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Structures</h1>
|
||||
<p>The following structures are available globally.</p>
|
||||
|
||||
@@ -132,17 +133,14 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Attachment</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Attachment</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Attachment</span><span class="p">:</span> <span class="kt">Equatable</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -164,17 +162,13 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Mail</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Mail</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -196,17 +190,13 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SMTP</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SMTP</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -220,7 +210,7 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Configuration for connecting with TLS. For more info, see <a href="https://github.com/IBM-Swift/BlueSSLService">https://github.com/IBM-Swift/BlueSSLService</a>.</p>
|
||||
<p>Configuration for connecting with TLS. For more info, see <a href="https://github.com/Kitura/BlueSSLService">https://github.com/Kitura/BlueSSLService</a>.</p>
|
||||
|
||||
<a href="Structs/TLSConfiguration.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
@@ -228,7 +218,7 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">TLSConfiguration</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">TLSConfiguration</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -243,8 +233,8 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+19
-21
@@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -100,11 +100,13 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Attachment</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Attachment</span></code></pre>
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Attachment</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Attachment</span><span class="p">:</span> <span class="kt">Equatable</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -121,9 +123,9 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP10AttachmentVAC10Foundation4DataV4data_SS4mimeSS4nameSb6inlines10DictionaryVyS2SG17additionalHeadersSayACG18relatedAttachmentstcfc"></a>
|
||||
<a name="/s:9SwiftSMTP10AttachmentV4data4mime4name6inline17additionalHeaders18relatedAttachmentsAC10Foundation4DataV_S2SSbSDyS2SGSayACGtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(data:mime:name:inline:additionalHeaders:relatedAttachments:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AttachmentVAC10Foundation4DataV4data_SS4mimeSS4nameSb6inlines10DictionaryVyS2SG17additionalHeadersSayACG18relatedAttachmentstcfc">init(data:mime:name:inline:additionalHeaders:relatedAttachments:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AttachmentV4data4mime4name6inline17additionalHeaders18relatedAttachmentsAC10Foundation4DataV_S2SSbSDyS2SGSayACGtcfc">init(data:<wbr>mime:<wbr>name:<wbr>inline:<wbr>additionalHeaders:<wbr>relatedAttachments:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -138,7 +140,7 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">,</span>
|
||||
<span class="nv">mime</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<span class="nv">inline</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span>
|
||||
@@ -239,9 +241,9 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP10AttachmentVACSS8filePath_SS4mimeSSSg4nameSb6inlines10DictionaryVyS2SG17additionalHeadersSayACG18relatedAttachmentstcfc"></a>
|
||||
<a name="/s:9SwiftSMTP10AttachmentV8filePath4mime4name6inline17additionalHeaders18relatedAttachmentsACSS_S2SSgSbSDyS2SGSayACGtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(filePath:mime:name:inline:additionalHeaders:relatedAttachments:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AttachmentVACSS8filePath_SS4mimeSSSg4nameSb6inlines10DictionaryVyS2SG17additionalHeadersSayACG18relatedAttachmentstcfc">init(filePath:mime:name:inline:additionalHeaders:relatedAttachments:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AttachmentV8filePath4mime4name6inline17additionalHeaders18relatedAttachmentsACSS_S2SSgSbSDyS2SGSayACGtcfc">init(filePath:<wbr>mime:<wbr>name:<wbr>inline:<wbr>additionalHeaders:<wbr>relatedAttachments:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -256,7 +258,7 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">filePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">filePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<span class="nv">mime</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="s">"application/octet-stream"</span><span class="p">,</span>
|
||||
<span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
|
||||
<span class="nv">inline</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span>
|
||||
@@ -357,9 +359,9 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP10AttachmentVACSS11htmlContent_SS12characterSetSb11alternatives10DictionaryVyS2SG17additionalHeadersSayACG18relatedAttachmentstcfc"></a>
|
||||
<a name="/s:9SwiftSMTP10AttachmentV11htmlContent12characterSet11alternative17additionalHeaders18relatedAttachmentsACSS_SSSbSDyS2SGSayACGtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(htmlContent:characterSet:alternative:additionalHeaders:relatedAttachments:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AttachmentVACSS11htmlContent_SS12characterSetSb11alternatives10DictionaryVyS2SG17additionalHeadersSayACG18relatedAttachmentstcfc">init(htmlContent:characterSet:alternative:additionalHeaders:relatedAttachments:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AttachmentV11htmlContent12characterSet11alternative17additionalHeaders18relatedAttachmentsACSS_SSSbSDyS2SGSayACGtcfc">init(htmlContent:<wbr>characterSet:<wbr>alternative:<wbr>additionalHeaders:<wbr>relatedAttachments:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -374,7 +376,7 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">htmlContent</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">htmlContent</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<span class="nv">characterSet</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="s">"utf-8"</span><span class="p">,</span>
|
||||
<span class="nv">alternative</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">,</span>
|
||||
<span class="nv">additionalHeaders</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">:</span> <span class="kt">String</span><span class="p">]</span> <span class="o">=</span> <span class="p">[:],</span>
|
||||
@@ -457,16 +459,12 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP10AttachmentV2eeoiSbAC_ACtFZ"></a>
|
||||
<a name="/s:9SwiftSMTP10AttachmentV2eeoiySbAC_ACtFZ"></a>
|
||||
<a name="//apple_ref/swift/Method/==(_:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AttachmentV2eeoiSbAC_ACtFZ">==(_:_:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP10AttachmentV2eeoiySbAC_ACtFZ">==(_:<wbr>_:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -481,7 +479,7 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="o">==</span><span class="p">(</span><span class="nv">lhs</span><span class="p">:</span> <span class="kt">Attachment</span><span class="p">,</span> <span class="nv">rhs</span><span class="p">:</span> <span class="kt">Attachment</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="o">==</span> <span class="p">(</span><span class="nv">lhs</span><span class="p">:</span> <span class="kt">Attachment</span><span class="p">,</span> <span class="nv">rhs</span><span class="p">:</span> <span class="kt">Attachment</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Bool</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -496,8 +494,8 @@ Different SMTP servers have different attachment size limits.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -100,11 +100,12 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Mail</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Mail</span></code></pre>
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Mail</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -137,7 +138,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">uuid</span> <span class="o">=</span> <span class="kt">UUID</span><span class="p">()</span><span class="o">.</span><span class="n">uuidString</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">uuid</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -164,7 +165,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">from</span><span class="p">:</span> <span class="kt"><a href="../Structs/Mail/User.html">User</a></span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">from</span><span class="p">:</span> <span class="kt"><a href="../Structs/Mail/User.html">User</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -191,7 +192,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">to</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">]</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">to</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">]</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -218,7 +219,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">cc</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">]</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">cc</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">]</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -245,7 +246,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">bcc</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">]</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">bcc</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">]</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -272,7 +273,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">subject</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">subject</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -299,7 +300,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">text</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">text</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -327,7 +328,7 @@ text, the last one will be used as the alternative (all the <code>Attachments</c
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">attachments</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Attachment.html">Attachment</a></span><span class="p">]</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">attachments</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Attachment.html">Attachment</a></span><span class="p">]</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -354,7 +355,7 @@ text, the last one will be used as the alternative (all the <code>Attachments</c
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">alternative</span><span class="p">:</span> <span class="kt"><a href="../Structs/Attachment.html">Attachment</a></span><span class="p">?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">alternative</span><span class="p">:</span> <span class="kt"><a href="../Structs/Attachment.html">Attachment</a></span><span class="p">?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -364,9 +365,9 @@ text, the last one will be used as the alternative (all the <code>Attachments</c
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP4MailV17additionalHeaderss10DictionaryVyS2SGvp"></a>
|
||||
<a name="/s:9SwiftSMTP4MailV17additionalHeadersSDyS2SGvp"></a>
|
||||
<a name="//apple_ref/swift/Property/additionalHeaders" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP4MailV17additionalHeaderss10DictionaryVyS2SGvp">additionalHeaders</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP4MailV17additionalHeadersSDyS2SGvp">additionalHeaders</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -382,7 +383,7 @@ Defaults to none. The following will be ignored: CONTENT-TYPE, CONTENT-DISPOSITI
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">additionalHeaders</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">:</span> <span class="kt">String</span><span class="p">]</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">additionalHeaders</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span> <span class="p">:</span> <span class="kt">String</span><span class="p">]</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -409,7 +410,7 @@ Defaults to none. The following will be ignored: CONTENT-TYPE, CONTENT-DISPOSITI
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">id</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">id</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -436,7 +437,7 @@ Defaults to none. The following will be ignored: CONTENT-TYPE, CONTENT-DISPOSITI
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">hostname</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">hostname</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -446,9 +447,9 @@ Defaults to none. The following will be ignored: CONTENT-TYPE, CONTENT-DISPOSITI
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP4MailVA2C4UserV4from_SayAEG2toAG2ccAG3bccSS7subjectSS4textSayAA10AttachmentVG11attachmentss10DictionaryVyS2SG17additionalHeaderstcfc"></a>
|
||||
<a name="/s:9SwiftSMTP4MailV4from2to2cc3bcc7subject4text11attachments17additionalHeadersA2C4UserV_SayAMGA2NS2SSayAA10AttachmentVGSDyS2SGtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(from:to:cc:bcc:subject:text:attachments:additionalHeaders:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP4MailVA2C4UserV4from_SayAEG2toAG2ccAG3bccSS7subjectSS4textSayAA10AttachmentVG11attachmentss10DictionaryVyS2SG17additionalHeaderstcfc">init(from:to:cc:bcc:subject:text:attachments:additionalHeaders:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP4MailV4from2to2cc3bcc7subject4text11attachments17additionalHeadersA2C4UserV_SayAMGA2NS2SSayAA10AttachmentVGSDyS2SGtcfc">init(from:<wbr>to:<wbr>cc:<wbr>bcc:<wbr>subject:<wbr>text:<wbr>attachments:<wbr>additionalHeaders:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -463,7 +464,7 @@ Defaults to none. The following will be ignored: CONTENT-TYPE, CONTENT-DISPOSITI
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">from</span><span class="p">:</span> <span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">from</span><span class="p">:</span> <span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">,</span>
|
||||
<span class="nv">to</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">],</span>
|
||||
<span class="nv">cc</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">]</span> <span class="o">=</span> <span class="p">[],</span>
|
||||
<span class="nv">bcc</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail/User.html">User</a></span><span class="p">]</span> <span class="o">=</span> <span class="p">[],</span>
|
||||
@@ -584,10 +585,6 @@ CONTENT-TRANSFER-ENCODING.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -609,7 +606,7 @@ CONTENT-TRANSFER-ENCODING.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">User</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">User</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -624,8 +621,8 @@ CONTENT-TRANSFER-ENCODING.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="../../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -100,11 +100,12 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>User</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">User</span></code></pre>
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">User</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -137,7 +138,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -164,7 +165,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">email</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">email</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -174,9 +175,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP4MailV4UserVAESSSg4name_SS5emailtcfc"></a>
|
||||
<a name="/s:9SwiftSMTP4MailV4UserV4name5emailAESSSg_SStcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(name:email:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP4MailV4UserVAESSSg4name_SS5emailtcfc">init(name:email:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP4MailV4UserV4name5emailAESSSg_SStcfc">init(name:<wbr>email:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -191,7 +192,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">email</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">email</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -237,8 +238,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -100,11 +100,12 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>SMTP</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SMTP</span></code></pre>
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SMTP</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -138,7 +139,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TLSMode</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TLSMode</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -148,9 +149,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP0B0VACSS8hostname_SS5emailSS8passwords5Int32V4portAC7TLSModeO7tlsModeAA16TLSConfigurationVSg0I13ConfigurationSayAA10AuthMethodOG11authMethodsSS10domainNameSu7timeouttcfc"></a>
|
||||
<a name="/s:9SwiftSMTP0B0V8hostname5email8password4port7tlsMode0G13Configuration11authMethods10domainName7timeoutACSS_S2Ss5Int32VAC7TLSModeOAA16TLSConfigurationVSgSayAA10AuthMethodOGSSSutcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(hostname:email:password:port:tlsMode:tlsConfiguration:authMethods:domainName:timeout:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0VACSS8hostname_SS5emailSS8passwords5Int32V4portAC7TLSModeO7tlsModeAA16TLSConfigurationVSg0I13ConfigurationSayAA10AuthMethodOG11authMethodsSS10domainNameSu7timeouttcfc">init(hostname:email:password:port:tlsMode:tlsConfiguration:authMethods:domainName:timeout:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V8hostname5email8password4port7tlsMode0G13Configuration11authMethods10domainName7timeoutACSS_S2Ss5Int32VAC7TLSModeOAA16TLSConfigurationVSgSayAA10AuthMethodOGSSSutcfc">init(hostname:<wbr>email:<wbr>password:<wbr>port:<wbr>tlsMode:<wbr>tlsConfiguration:<wbr>authMethods:<wbr>domainName:<wbr>timeout:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -176,7 +177,7 @@ IPv6, then timeout, and fall back to IPv4. You can avoid this by disabling IPv6
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">hostname</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">hostname</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<span class="nv">email</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<span class="nv">password</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||||
<span class="nv">port</span><span class="p">:</span> <span class="kt">Int32</span> <span class="o">=</span> <span class="mi">587</span><span class="p">,</span>
|
||||
@@ -310,9 +311,9 @@ certificates is used. See <code><a href="../Structs/TLSConfiguration.html">TLSCo
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP0B0V4sendyAA4MailV_ys5Error_pSgcSg10completiontF"></a>
|
||||
<a name="/s:9SwiftSMTP0B0V4send_10completionyAA4MailV_ys5Error_pSgcSgtF"></a>
|
||||
<a name="//apple_ref/swift/Method/send(_:completion:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V4sendyAA4MailV_ys5Error_pSgcSg10completiontF">send(_:completion:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V4send_10completionyAA4MailV_ys5Error_pSgcSgtF">send(_:<wbr>completion:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -327,7 +328,7 @@ certificates is used. See <code><a href="../Structs/TLSConfiguration.html">TLSCo
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">send</span><span class="p">(</span><span class="n">_</span> <span class="nv">mail</span><span class="p">:</span> <span class="kt"><a href="../Structs/Mail.html">Mail</a></span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">((</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">send</span><span class="p">(</span><span class="n">_</span> <span class="nv">mail</span><span class="p">:</span> <span class="kt"><a href="../Structs/Mail.html">Mail</a></span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">((</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -368,9 +369,9 @@ certificates is used. See <code><a href="../Structs/TLSConfiguration.html">TLSCo
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP0B0V4sendySayAA4MailVG_yAF_s5Error_pSgtcSg8progressyAG_SayAF_sAH_ptGtcSg10completiontF"></a>
|
||||
<a name="/s:9SwiftSMTP0B0V4send_8progress10completionySayAA4MailVG_yAH_s5Error_pSgtcSgyAI_SayAH_sAJ_ptGtcSgtF"></a>
|
||||
<a name="//apple_ref/swift/Method/send(_:progress:completion:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V4sendySayAA4MailVG_yAF_s5Error_pSgtcSg8progressyAG_SayAF_sAH_ptGtcSg10completiontF">send(_:progress:completion:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V4send_8progress10completionySayAA4MailVG_yAH_s5Error_pSgtcSgyAI_SayAH_sAJ_ptGtcSgtF">send(_:<wbr>progress:<wbr>completion:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -401,7 +402,7 @@ in separate calls to <code>send</code>.</li>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">send</span><span class="p">(</span><span class="n">_</span> <span class="nv">mails</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail.html">Mail</a></span><span class="p">],</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">send</span><span class="p">(</span><span class="n">_</span> <span class="nv">mails</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/Mail.html">Mail</a></span><span class="p">],</span>
|
||||
<span class="nv">progress</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:9SwiftSMTP8Progressa">Progress</a></span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
|
||||
<span class="nv">completion</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:9SwiftSMTP10Completiona">Completion</a></span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
||||
|
||||
@@ -464,8 +465,8 @@ corresponding <code>Error</code>s. (optional)</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+18
-29
@@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="../../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -100,11 +100,12 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>TLSMode</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TLSMode</span></code></pre>
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TLSMode</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -120,9 +121,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP0B0V7TLSModeO6normalA2EmF"></a>
|
||||
<a name="/s:9SwiftSMTP0B0V7TLSModeO6normalyA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/normal" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V7TLSModeO6normalA2EmF">normal</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V7TLSModeO6normalyA2EmF">normal</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -137,23 +138,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">normal</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">normal</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP0B0V7TLSModeO9ignoreTLSA2EmF"></a>
|
||||
<a name="/s:9SwiftSMTP0B0V7TLSModeO9ignoreTLSyA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/ignoreTLS" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V7TLSModeO9ignoreTLSA2EmF">ignoreTLS</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V7TLSModeO9ignoreTLSyA2EmF">ignoreTLS</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -168,23 +165,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">ignoreTLS</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">ignoreTLS</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP0B0V7TLSModeO10requireTLSA2EmF"></a>
|
||||
<a name="/s:9SwiftSMTP0B0V7TLSModeO10requireTLSyA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/requireTLS" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V7TLSModeO10requireTLSA2EmF">requireTLS</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V7TLSModeO10requireTLSyA2EmF">requireTLS</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -199,23 +192,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">requireTLS</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">requireTLS</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP0B0V7TLSModeO15requireSTARTTLSA2EmF"></a>
|
||||
<a name="/s:9SwiftSMTP0B0V7TLSModeO15requireSTARTTLSyA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/requireSTARTTLS" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V7TLSModeO15requireSTARTTLSA2EmF">requireSTARTTLS</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP0B0V7TLSModeO15requireSTARTTLSyA2EmF">requireSTARTTLS</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -230,7 +219,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">requireSTARTTLS</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">requireSTARTTLS</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -245,8 +234,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+32
-19
@@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="../img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -100,15 +100,16 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>TLSConfiguration</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">TLSConfiguration</span></code></pre>
|
||||
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">TLSConfiguration</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Configuration for connecting with TLS. For more info, see <a href="https://github.com/IBM-Swift/BlueSSLService">https://github.com/IBM-Swift/BlueSSLService</a>.</p>
|
||||
<p>Configuration for connecting with TLS. For more info, see <a href="https://github.com/Kitura/BlueSSLService">https://github.com/Kitura/BlueSSLService</a>.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@@ -120,9 +121,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP16TLSConfigurationVACSSSg15withCipherSuite_Sb34clientAllowsSelfSignedCertificatestcfc"></a>
|
||||
<a name="/s:9SwiftSMTP16TLSConfigurationV15withCipherSuite34clientAllowsSelfSignedCertificatesACSSSg_Sbtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(withCipherSuite:clientAllowsSelfSignedCertificates:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP16TLSConfigurationVACSSSg15withCipherSuite_Sb34clientAllowsSelfSignedCertificatestcfc">init(withCipherSuite:clientAllowsSelfSignedCertificates:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP16TLSConfigurationV15withCipherSuite34clientAllowsSelfSignedCertificatesACSSSg_Sbtcfc">init(withCipherSuite:<wbr>clientAllowsSelfSignedCertificates:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -137,7 +138,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">withCipherSuite</span> <span class="nv">cipherSuite</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">withCipherSuite</span> <span class="nv">cipherSuite</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
|
||||
<span class="nv">clientAllowsSelfSignedCertificates</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
@@ -179,9 +180,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP16TLSConfigurationVACSSSg25withCACertificateFilePath_AD016usingCertificateF0AD0d3KeyF0Sb0H15SelfSignedCertsAD11cipherSuitetcfc"></a>
|
||||
<a name="/s:9SwiftSMTP16TLSConfigurationV25withCACertificateFilePath016usingCertificateF00d3KeyF00H15SelfSignedCerts11cipherSuiteACSSSg_A2ISbAItcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(withCACertificateFilePath:usingCertificateFile:withKeyFile:usingSelfSignedCerts:cipherSuite:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP16TLSConfigurationVACSSSg25withCACertificateFilePath_AD016usingCertificateF0AD0d3KeyF0Sb0H15SelfSignedCertsAD11cipherSuitetcfc">init(withCACertificateFilePath:usingCertificateFile:withKeyFile:usingSelfSignedCerts:cipherSuite:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP16TLSConfigurationV25withCACertificateFilePath016usingCertificateF00d3KeyF00H15SelfSignedCerts11cipherSuiteACSSSg_A2ISbAItcfc">init(withCACertificateFilePath:<wbr>usingCertificateFile:<wbr>withKeyFile:<wbr>usingSelfSignedCerts:<wbr>cipherSuite:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -196,7 +197,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">withCACertificateFilePath</span> <span class="nv">caCertificateFilePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">withCACertificateFilePath</span> <span class="nv">caCertificateFilePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||||
<span class="n">usingCertificateFile</span> <span class="nv">certificateFilePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||||
<span class="n">withKeyFile</span> <span class="nv">keyFilePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
|
||||
<span class="n">usingSelfSignedCerts</span> <span class="nv">selfSigned</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">,</span>
|
||||
@@ -277,9 +278,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP16TLSConfigurationVACSSSg26withCACertificateDirectory_AD20usingCertificateFileAD0d3KeyI0Sb0G15SelfSignedCertsAD11cipherSuitetcfc"></a>
|
||||
<a name="/s:9SwiftSMTP16TLSConfigurationV26withCACertificateDirectory20usingCertificateFile0d3KeyI00G15SelfSignedCerts11cipherSuiteACSSSg_A2ISbAItcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(withCACertificateDirectory:usingCertificateFile:withKeyFile:usingSelfSignedCerts:cipherSuite:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP16TLSConfigurationVACSSSg26withCACertificateDirectory_AD20usingCertificateFileAD0d3KeyI0Sb0G15SelfSignedCertsAD11cipherSuitetcfc">init(withCACertificateDirectory:usingCertificateFile:withKeyFile:usingSelfSignedCerts:cipherSuite:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP16TLSConfigurationV26withCACertificateDirectory20usingCertificateFile0d3KeyI00G15SelfSignedCerts11cipherSuiteACSSSg_A2ISbAItcfc">init(withCACertificateDirectory:<wbr>usingCertificateFile:<wbr>withKeyFile:<wbr>usingSelfSignedCerts:<wbr>cipherSuite:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -296,7 +297,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">withCACertificateDirectory</span> <span class="nv">caCertificateDirPath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">withCACertificateDirectory</span> <span class="nv">caCertificateDirPath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||||
<span class="n">usingCertificateFile</span> <span class="nv">certificateFilePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||||
<span class="n">withKeyFile</span> <span class="nv">keyFilePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
|
||||
<span class="n">usingSelfSignedCerts</span> <span class="nv">selfSigned</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">,</span>
|
||||
@@ -377,9 +378,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:9SwiftSMTP16TLSConfigurationVACSSSg17withChainFilePath_AD0D8PasswordSb20usingSelfSignedCertsSb012clientAllowsjK12CertificatesAD11cipherSuitetcfc"></a>
|
||||
<a name="/s:9SwiftSMTP16TLSConfigurationV17withChainFilePath0D8Password20usingSelfSignedCerts012clientAllowsjK12Certificates11cipherSuiteACSSSg_AIS2bAItcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(withChainFilePath:withPassword:usingSelfSignedCerts:clientAllowsSelfSignedCertificates:cipherSuite:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:9SwiftSMTP16TLSConfigurationVACSSSg17withChainFilePath_AD0D8PasswordSb20usingSelfSignedCertsSb012clientAllowsjK12CertificatesAD11cipherSuitetcfc">init(withChainFilePath:withPassword:usingSelfSignedCerts:clientAllowsSelfSignedCertificates:cipherSuite:)</a>
|
||||
<a class="token" href="#/s:9SwiftSMTP16TLSConfigurationV17withChainFilePath0D8Password20usingSelfSignedCerts012clientAllowsjK12Certificates11cipherSuiteACSSSg_AIS2bAItcfc">init(withChainFilePath:<wbr>withPassword:<wbr>usingSelfSignedCerts:<wbr>clientAllowsSelfSignedCertificates:<wbr>cipherSuite:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -396,7 +397,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">withChainFilePath</span> <span class="nv">chainFilePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">withChainFilePath</span> <span class="nv">chainFilePath</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||||
<span class="n">withPassword</span> <span class="nv">password</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
|
||||
<span class="n">usingSelfSignedCerts</span> <span class="nv">selfSigned</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">,</span>
|
||||
<span class="nv">clientAllowsSelfSignedCertificates</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span>
|
||||
@@ -444,6 +445,18 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>clientAllowsSelfSignedCertificates</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>True if, as a client, connections to self-signed servers are allowed</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
@@ -467,7 +480,7 @@
|
||||
<code>
|
||||
<a name="/"></a>
|
||||
<a name="//apple_ref/swift/Method/init(withPEMCertificateString:usingSelfSignedCerts:cipherSuite:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/">init(withPEMCertificateString:usingSelfSignedCerts:cipherSuite:)</a>
|
||||
<a class="token" href="#/">init(withPEMCertificateString:<wbr>usingSelfSignedCerts:<wbr>cipherSuite:<wbr>)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -489,8 +502,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Type Aliases" class="dashAnchor"></a>
|
||||
|
||||
<a title="Type Aliases Reference"></a>
|
||||
|
||||
@@ -32,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -99,7 +100,7 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
<h1>Type Aliases</h1>
|
||||
<p>The following type aliases are available globally.</p>
|
||||
|
||||
@@ -130,7 +131,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Progress</span> <span class="o">=</span> <span class="p">((</span><span class="kt"><a href="Structs/Mail.html">Mail</a></span><span class="p">,</span> <span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Progress</span> <span class="o">=</span> <span class="p">((</span><span class="kt"><a href="Structs/Mail.html">Mail</a></span><span class="p">,</span> <span class="kt">Error</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -158,7 +159,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Completion</span> <span class="o">=</span> <span class="p">(([</span><span class="kt"><a href="Structs/Mail.html">Mail</a></span><span class="p">],</span> <span class="p">[(</span><span class="kt"><a href="Structs/Mail.html">Mail</a></span><span class="p">,</span> <span class="kt">Error</span><span class="p">)])</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Completion</span> <span class="o">=</span> <span class="p">(([</span><span class="kt"><a href="Structs/Mail.html">Mail</a></span><span class="p">],</span> <span class="p">[(</span><span class="kt"><a href="Structs/Mail.html">Mail</a></span><span class="p">,</span> <span class="kt">Error</span><span class="p">)])</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -173,8 +174,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -63,6 +63,10 @@ a {
|
||||
a:hover, a:focus {
|
||||
outline: 0;
|
||||
text-decoration: underline; }
|
||||
a.discouraged {
|
||||
text-decoration: line-through; }
|
||||
a.discouraged:hover, a.discouraged:focus {
|
||||
text-decoration: underline line-through; }
|
||||
|
||||
table {
|
||||
background: #fff;
|
||||
@@ -90,10 +94,10 @@ pre {
|
||||
code {
|
||||
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; }
|
||||
|
||||
p > code, li > code {
|
||||
.item-container p > code, .item-container li > code, .top-matter p > code, .top-matter li > code {
|
||||
background: #f7f7f7;
|
||||
padding: .2em; }
|
||||
p > code:before, p > code:after, li > code:before, li > code:after {
|
||||
.item-container p > code:before, .item-container p > code:after, .item-container li > code:before, .item-container li > code:after, .top-matter p > code:before, .top-matter p > code:after, .top-matter li > code:before, .top-matter li > code:after {
|
||||
letter-spacing: -.2em;
|
||||
content: "\00a0"; }
|
||||
|
||||
@@ -107,7 +111,6 @@ pre code {
|
||||
@media (min-width: 768px) {
|
||||
.content-wrapper {
|
||||
flex-direction: row; } }
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
padding: 8px;
|
||||
@@ -153,7 +156,6 @@ pre code {
|
||||
word-wrap: normal;
|
||||
background: #fbfbfb;
|
||||
border-right: 1px solid #ddd; } }
|
||||
|
||||
.nav-groups {
|
||||
list-style-type: none;
|
||||
padding-left: 0; }
|
||||
@@ -184,7 +186,6 @@ pre code {
|
||||
order: 2;
|
||||
flex: 1;
|
||||
padding-bottom: 60px; } }
|
||||
|
||||
.section {
|
||||
padding: 0 32px;
|
||||
border-bottom: 1px solid #ddd; }
|
||||
@@ -197,6 +198,8 @@ pre code {
|
||||
.section-name {
|
||||
color: #666;
|
||||
display: block; }
|
||||
.section-name p {
|
||||
margin-bottom: inherit; }
|
||||
|
||||
.declaration .highlight {
|
||||
overflow-x: initial;
|
||||
@@ -215,6 +218,22 @@ pre code {
|
||||
content: "";
|
||||
display: block; }
|
||||
|
||||
.section-name-container {
|
||||
position: relative; }
|
||||
.section-name-container .section-name-link {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
margin-bottom: 0; }
|
||||
.section-name-container .section-name {
|
||||
position: relative;
|
||||
pointer-events: none;
|
||||
z-index: 1; }
|
||||
.section-name-container .section-name a {
|
||||
pointer-events: auto; }
|
||||
|
||||
.item-container {
|
||||
padding: 0; }
|
||||
|
||||
@@ -225,9 +244,11 @@ pre code {
|
||||
.item a[name]:before {
|
||||
content: "";
|
||||
display: block; }
|
||||
.item .token {
|
||||
.item .token, .item .direct-link {
|
||||
display: inline-block;
|
||||
text-indent: -20px;
|
||||
padding-left: 3px;
|
||||
margin-left: 0px;
|
||||
margin-left: 20px;
|
||||
font-size: 1rem; }
|
||||
.item .declaration-note {
|
||||
font-size: .85em;
|
||||
@@ -287,9 +308,9 @@ pre code {
|
||||
.language .aside-title {
|
||||
color: #4183c4; }
|
||||
|
||||
.aside-warning {
|
||||
.aside-warning, .aside-deprecated, .aside-unavailable {
|
||||
border-left: 5px solid #ff6666; }
|
||||
.aside-warning .aside-title {
|
||||
.aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title {
|
||||
color: #ff0000; }
|
||||
|
||||
.graybox {
|
||||
@@ -325,6 +346,7 @@ pre code {
|
||||
|
||||
html.dash .header, html.dash .breadcrumbs, html.dash .navigation {
|
||||
display: none; }
|
||||
|
||||
html.dash .height-container {
|
||||
display: block; }
|
||||
|
||||
@@ -338,14 +360,17 @@ form[role=search] input {
|
||||
border-radius: 1em; }
|
||||
.loading form[role=search] input {
|
||||
background: white url(../img/spinner.gif) center right 4px no-repeat; }
|
||||
|
||||
form[role=search] .tt-menu {
|
||||
margin: 0;
|
||||
min-width: 300px;
|
||||
background: #fbfbfb;
|
||||
color: #333;
|
||||
border: 1px solid #ddd; }
|
||||
|
||||
form[role=search] .tt-highlight {
|
||||
font-weight: bold; }
|
||||
|
||||
form[role=search] .tt-suggestion {
|
||||
font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
padding: 0 8px; }
|
||||
@@ -358,11 +383,13 @@ form[role=search] .tt-suggestion {
|
||||
font-weight: normal;
|
||||
font-size: 0.9em;
|
||||
padding-left: 16px; }
|
||||
|
||||
form[role=search] .tt-suggestion:hover,
|
||||
form[role=search] .tt-suggestion.tt-cursor {
|
||||
cursor: pointer;
|
||||
background-color: #4183c4;
|
||||
color: #fff; }
|
||||
|
||||
form[role=search] .tt-suggestion:hover .doc-parent-name,
|
||||
form[role=search] .tt-suggestion.tt-cursor .doc-parent-name {
|
||||
color: #fff; }
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -99,15 +99,15 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
|
||||
<h1 id='swift-smtp' class='heading'>Swift-SMTP</h1>
|
||||
|
||||
<p><img src="https://github.com/IBM-Swift/Swift-SMTP/blob/master/Assets/swift-smtp-bird.png?raw=true" alt="Swift-SMTP bird"></p>
|
||||
<p><img src="https://github.com/Kitura/Swift-SMTP/blob/master/Assets/swift-smtp-bird.png?raw=true" alt="Swift-SMTP bird"></p>
|
||||
|
||||
<p>Swift SMTP client.</p>
|
||||
|
||||
<p><img src="https://travis-ci.org/IBM-Swift/Swift-SMTP.svg?branch=master" alt="Build Status">
|
||||
<p><img src="https://travis-ci.org/Kitura/Swift-SMTP.svg?branch=master" alt="Build Status">
|
||||
<img src="https://img.shields.io/badge/os-macOS-green.svg?style=flat" alt="macOS">
|
||||
<img src="https://img.shields.io/badge/os-linux-green.svg?style=flat" alt="Linux">
|
||||
<img src="https://img.shields.io/badge/license-Apache2-blue.svg?style=flat" alt="Apache 2"></p>
|
||||
@@ -118,14 +118,43 @@
|
||||
<li>Authenticate with CRAM-MD5, LOGIN, PLAIN, or XOAUTH2</li>
|
||||
<li>Send emails with local file, HTML, and raw data attachments</li>
|
||||
<li>Add custom headers</li>
|
||||
<li><a href="https://ibm-swift.github.io/Swift-SMTP/">Documentation</a></li>
|
||||
<li><a href="https://kitura.github.io/Swift-SMTP/">Documentation</a></li>
|
||||
</ul>
|
||||
<h2 id='swift-version' class='heading'>Swift Version</h2>
|
||||
|
||||
<p>macOS & Linux: <code>Swift 4.0.3</code> or <code>Swift 4.1</code></p>
|
||||
<p>macOS & Linux: <code>Swift 4.0.3</code>, <code>Swift 4.1</code> and <code>Swift 4.1.2</code></p>
|
||||
<h2 id='installation' class='heading'>Installation</h2>
|
||||
|
||||
<p>You can add <code>SwiftSMTP</code> to your project using <a href="https://swift.org/package-manager/">Swift Package Manager</a>. If your project does not have a <code>Package.swift</code> file, create one by running <code>swift package init</code> in the root directory of your project. Then open <code>Package.swift</code> and add <code>SwiftSMTP</code> as a dependency. Be sure to add it to your desired targets as well:</p>
|
||||
<pre class="highlight swift"><code><span class="c1">// swift-tools-version:4.0</span>
|
||||
|
||||
<span class="kd">import</span> <span class="kt">PackageDescription</span>
|
||||
|
||||
<span class="k">let</span> <span class="nv">package</span> <span class="o">=</span> <span class="kt">Package</span><span class="p">(</span>
|
||||
<span class="nv">name</span><span class="p">:</span> <span class="s">"MyProject"</span><span class="p">,</span>
|
||||
<span class="nv">products</span><span class="p">:</span> <span class="p">[</span>
|
||||
<span class="o">.</span><span class="nf">library</span><span class="p">(</span>
|
||||
<span class="nv">name</span><span class="p">:</span> <span class="s">"MyProject"</span><span class="p">,</span>
|
||||
<span class="nv">targets</span><span class="p">:</span> <span class="p">[</span><span class="s">"MyProject"</span><span class="p">]),</span>
|
||||
<span class="p">],</span>
|
||||
<span class="nv">dependencies</span><span class="p">:</span> <span class="p">[</span>
|
||||
<span class="o">.</span><span class="nf">package</span><span class="p">(</span><span class="nv">url</span><span class="p">:</span> <span class="s">"https://github.com/Kitura/Swift-SMTP"</span><span class="p">,</span> <span class="o">.</span><span class="nf">upToNextMinor</span><span class="p">(</span><span class="nv">from</span><span class="p">:</span> <span class="s">"5.1.0"</span><span class="p">)),</span> <span class="c1">// add the dependency</span>
|
||||
<span class="p">],</span>
|
||||
<span class="nv">targets</span><span class="p">:</span> <span class="p">[</span>
|
||||
<span class="o">.</span><span class="nf">target</span><span class="p">(</span>
|
||||
<span class="nv">name</span><span class="p">:</span> <span class="s">"MyProject"</span><span class="p">,</span>
|
||||
<span class="nv">dependencies</span><span class="p">:</span> <span class="p">[</span><span class="s">"SwiftSMTP"</span><span class="p">]),</span> <span class="c1">// add targets</span>
|
||||
<span class="o">.</span><span class="nf">testTarget</span><span class="p">(</span> <span class="c1">// note "SwiftSMTP" (NO HYPHEN)</span>
|
||||
<span class="nv">name</span><span class="p">:</span> <span class="s">"MyProjectTests"</span><span class="p">,</span>
|
||||
<span class="nv">dependencies</span><span class="p">:</span> <span class="p">[</span><span class="s">"MyProject"</span><span class="p">]),</span>
|
||||
<span class="p">]</span>
|
||||
<span class="p">)</span>
|
||||
</code></pre>
|
||||
|
||||
<p>After adding the dependency and saving, run <code>swift package generate-xcodeproj</code> in the root directory of your project. This will fetch dependencies and create an Xcode project which you can open and begin editing.</p>
|
||||
<h2 id='migration-guide' class='heading'>Migration Guide</h2>
|
||||
|
||||
<p>Version <code>5.0.0</code> brings breaking changes. See the quick migration guide <a href="https://github.com/IBM-Swift/Swift-SMTP/blob/master/migration-guide.md">here</a>.</p>
|
||||
<p>Version <code>5.0.0</code> brings breaking changes. See the quick migration guide <a href="https://github.com/Kitura/Swift-SMTP/blob/master/migration-guide.md">here</a>.</p>
|
||||
<h2 id='usage' class='heading'>Usage</h2>
|
||||
|
||||
<p>Initialize an <code><a href="Structs/SMTP.html">SMTP</a></code> instance:</p>
|
||||
@@ -151,7 +180,7 @@
|
||||
<span class="nv">timeout</span><span class="p">:</span> <span class="kt">UInt</span> <span class="o">=</span> <span class="mi">10</span><span class="p">)</span>
|
||||
</code></pre>
|
||||
|
||||
<p>By default, the <code><a href="Structs/SMTP.html">SMTP</a></code> struct connects on port <code>587</code> and sends mail only if a TLS connection can be established. It also uses a <code><a href="Structs/TLSConfiguration.html">TLSConfiguration</a></code> that uses no backing certificates. View the <a href="https://ibm-swift.github.io/Swift-SMTP/">docs</a> for more configuration options.</p>
|
||||
<p>By default, the <code><a href="Structs/SMTP.html">SMTP</a></code> struct connects on port <code>587</code> and sends mail only if a TLS connection can be established. It also uses a <code><a href="Structs/TLSConfiguration.html">TLSConfiguration</a></code> that uses no backing certificates. View the <a href="https://kitura.github.io/Swift-SMTP/">docs</a> for more configuration options.</p>
|
||||
<h3 id='send-email' class='heading'>Send email</h3>
|
||||
|
||||
<p>Create a <code><a href="Structs/Mail.html">Mail</a></code> object and use your <code><a href="Structs/SMTP.html">SMTP</a></code> handle to send it. To set the sender and receiver of an email, use the <code>User</code> struct:</p>
|
||||
@@ -259,8 +288,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -8,26 +8,41 @@ if (navigator.userAgent.match(/xcode/i)) {
|
||||
window.jazzy.docset = true
|
||||
}
|
||||
|
||||
// On doc load, toggle the URL hash discussion if present
|
||||
$(document).ready(function() {
|
||||
if (!window.jazzy.docset) {
|
||||
var linkToHash = $('a[href="' + window.location.hash +'"]');
|
||||
linkToHash.trigger("click");
|
||||
}
|
||||
});
|
||||
function toggleItem($link, $content) {
|
||||
var animationDuration = 300;
|
||||
$link.toggleClass('token-open');
|
||||
$content.slideToggle(animationDuration);
|
||||
}
|
||||
|
||||
// On token click, toggle its discussion and animate token.marginLeft
|
||||
$(".token").click(function(event) {
|
||||
function itemLinkToContent($link) {
|
||||
return $link.parent().parent().next();
|
||||
}
|
||||
|
||||
// On doc load + hash-change, open any targetted item
|
||||
function openCurrentItemIfClosed() {
|
||||
if (window.jazzy.docset) {
|
||||
return;
|
||||
}
|
||||
var link = $(this);
|
||||
var animationDuration = 300;
|
||||
$content = link.parent().parent().next();
|
||||
$content.slideToggle(animationDuration);
|
||||
var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token');
|
||||
$content = itemLinkToContent($link);
|
||||
if ($content.is(':hidden')) {
|
||||
toggleItem($link, $content);
|
||||
}
|
||||
}
|
||||
|
||||
$(openCurrentItemIfClosed);
|
||||
$(window).on('hashchange', openCurrentItemIfClosed);
|
||||
|
||||
// On item link ('token') click, toggle its discussion
|
||||
$('.token').on('click', function(event) {
|
||||
if (window.jazzy.docset) {
|
||||
return;
|
||||
}
|
||||
var $link = $(this);
|
||||
toggleItem($link, itemLinkToContent($link));
|
||||
|
||||
// Keeps the document from jumping to the hash.
|
||||
var href = $(this).attr('href');
|
||||
var href = $link.attr('href');
|
||||
if (history.pushState) {
|
||||
history.pushState({}, '', href);
|
||||
} else {
|
||||
@@ -36,8 +51,20 @@ $(".token").click(function(event) {
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
// Dumb down quotes within code blocks that delimit strings instead of quotations
|
||||
// https://github.com/realm/jazzy/issues/714
|
||||
$("code q").replaceWith(function () {
|
||||
return ["\"", $(this).contents(), "\""];
|
||||
// Clicks on links to the current, closed, item need to open the item
|
||||
$("a:not('.token')").on('click', function() {
|
||||
if (location == this.href) {
|
||||
openCurrentItemIfClosed();
|
||||
}
|
||||
});
|
||||
|
||||
// KaTeX rendering
|
||||
if ("katex" in window) {
|
||||
$($('.math').each( (_, element) => {
|
||||
katex.render(element.textContent, element, {
|
||||
displayMode: $(element).hasClass('m-block'),
|
||||
throwOnError: false,
|
||||
trust: true
|
||||
});
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
$(function(){
|
||||
var searchIndex = lunr(function() {
|
||||
this.ref('url');
|
||||
this.field('name');
|
||||
});
|
||||
|
||||
var $typeahead = $('[data-typeahead]');
|
||||
var $form = $typeahead.parents('form');
|
||||
var searchURL = $form.attr('action');
|
||||
@@ -26,21 +21,34 @@ $(function(){
|
||||
$form.addClass('loading');
|
||||
|
||||
$.getJSON(searchURL).then(function(searchData) {
|
||||
$.each(searchData, function (url, doc) {
|
||||
searchIndex.add({url: url, name: doc.name});
|
||||
const searchIndex = lunr(function() {
|
||||
this.ref('url');
|
||||
this.field('name');
|
||||
this.field('abstract');
|
||||
for (const [url, doc] of Object.entries(searchData)) {
|
||||
this.add({url: url, name: doc.name, abstract: doc.abstract});
|
||||
}
|
||||
});
|
||||
|
||||
$typeahead.typeahead(
|
||||
{
|
||||
highlight: true,
|
||||
minLength: 3
|
||||
minLength: 3,
|
||||
autoselect: true
|
||||
},
|
||||
{
|
||||
limit: 10,
|
||||
display: displayTemplate,
|
||||
templates: { suggestion: suggestionTemplate },
|
||||
source: function(query, sync) {
|
||||
var results = searchIndex.search(query).map(function(result) {
|
||||
const lcSearch = query.toLowerCase();
|
||||
const results = searchIndex.query(function(q) {
|
||||
q.term(lcSearch, { boost: 100 });
|
||||
q.term(lcSearch, {
|
||||
boost: 10,
|
||||
wildcard: lunr.Query.wildcard.TRAILING
|
||||
});
|
||||
}).map(function(result) {
|
||||
var doc = searchData[result.ref];
|
||||
doc.url = result.ref;
|
||||
return doc;
|
||||
|
||||
Vendored
Executable → Regular
+2
-4
File diff suppressed because one or more lines are too long
Vendored
Executable → Regular
+3
-3
File diff suppressed because one or more lines are too long
+209
-53
@@ -1,18 +1,19 @@
|
||||
/*!
|
||||
* typeahead.js 0.11.1
|
||||
* https://github.com/twitter/typeahead.js
|
||||
* Copyright 2013-2015 Twitter, Inc. and other contributors; Licensed MIT
|
||||
* typeahead.js 1.3.1
|
||||
* https://github.com/corejavascript/typeahead.js
|
||||
* Copyright 2013-2020 Twitter, Inc. and other contributors; Licensed MIT
|
||||
*/
|
||||
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define("typeahead.js", [ "jquery" ], function(a0) {
|
||||
define([ "jquery" ], function(a0) {
|
||||
return factory(a0);
|
||||
});
|
||||
} else if (typeof exports === "object") {
|
||||
} else if (typeof module === "object" && module.exports) {
|
||||
module.exports = factory(require("jquery"));
|
||||
} else {
|
||||
factory(jQuery);
|
||||
factory(root["jQuery"]);
|
||||
}
|
||||
})(this, function($) {
|
||||
var _ = function() {
|
||||
@@ -148,6 +149,13 @@
|
||||
stringify: function(val) {
|
||||
return _.isString(val) ? val : JSON.stringify(val);
|
||||
},
|
||||
guid: function() {
|
||||
function _p8(s) {
|
||||
var p = (Math.random().toString(16) + "000000000").substr(2, 8);
|
||||
return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p;
|
||||
}
|
||||
return "tt-" + _p8() + _p8(true) + _p8(true) + _p8();
|
||||
},
|
||||
noop: function() {}
|
||||
};
|
||||
}();
|
||||
@@ -189,7 +197,7 @@
|
||||
function buildHtml(c) {
|
||||
return {
|
||||
wrapper: '<span class="' + c.wrapper + '"></span>',
|
||||
menu: '<div class="' + c.menu + '"></div>'
|
||||
menu: '<div role="listbox" class="' + c.menu + '"></div>'
|
||||
};
|
||||
}
|
||||
function buildSelectors(classes) {
|
||||
@@ -264,10 +272,8 @@
|
||||
}
|
||||
_.mixin(EventBus.prototype, {
|
||||
_trigger: function(type, args) {
|
||||
var $e;
|
||||
$e = $.Event(namespace + type);
|
||||
(args = args || []).unshift($e);
|
||||
this.$el.trigger.apply(this.$el, args);
|
||||
var $e = $.Event(namespace + type);
|
||||
this.$el.trigger.call(this.$el, $e, args || []);
|
||||
return $e;
|
||||
},
|
||||
before: function(type) {
|
||||
@@ -384,7 +390,36 @@
|
||||
tagName: "strong",
|
||||
className: null,
|
||||
wordsOnly: false,
|
||||
caseSensitive: false
|
||||
caseSensitive: false,
|
||||
diacriticInsensitive: false
|
||||
};
|
||||
var accented = {
|
||||
A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]",
|
||||
B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]",
|
||||
C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]",
|
||||
D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]",
|
||||
E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]",
|
||||
F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]",
|
||||
G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]",
|
||||
H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]",
|
||||
I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]",
|
||||
J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]",
|
||||
K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]",
|
||||
L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]",
|
||||
M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]",
|
||||
N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]",
|
||||
O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]",
|
||||
P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]",
|
||||
Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]",
|
||||
R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]",
|
||||
S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]",
|
||||
T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]",
|
||||
U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]",
|
||||
V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]",
|
||||
W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]",
|
||||
X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]",
|
||||
Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]",
|
||||
Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]"
|
||||
};
|
||||
return function hightlight(o) {
|
||||
var regex;
|
||||
@@ -393,7 +428,7 @@
|
||||
return;
|
||||
}
|
||||
o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ];
|
||||
regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly);
|
||||
regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive);
|
||||
traverse(o.node, hightlightTextNode);
|
||||
function hightlightTextNode(textNode) {
|
||||
var match, patternNode, wrapperNode;
|
||||
@@ -419,10 +454,17 @@
|
||||
}
|
||||
}
|
||||
};
|
||||
function getRegex(patterns, caseSensitive, wordsOnly) {
|
||||
function accent_replacer(chr) {
|
||||
return accented[chr.toUpperCase()] || chr;
|
||||
}
|
||||
function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) {
|
||||
var escapedPatterns = [], regexStr;
|
||||
for (var i = 0, len = patterns.length; i < len; i++) {
|
||||
escapedPatterns.push(_.escapeRegExChars(patterns[i]));
|
||||
var escapedWord = _.escapeRegExChars(patterns[i]);
|
||||
if (diacriticInsensitive) {
|
||||
escapedWord = escapedWord.replace(/\S/g, accent_replacer);
|
||||
}
|
||||
escapedPatterns.push(escapedWord);
|
||||
}
|
||||
regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")";
|
||||
return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i");
|
||||
@@ -441,6 +483,7 @@
|
||||
40: "down"
|
||||
};
|
||||
function Input(o, www) {
|
||||
var id;
|
||||
o = o || {};
|
||||
if (!o.input) {
|
||||
$.error("input is missing");
|
||||
@@ -448,6 +491,18 @@
|
||||
www.mixin(this);
|
||||
this.$hint = $(o.hint);
|
||||
this.$input = $(o.input);
|
||||
this.$menu = $(o.menu);
|
||||
id = this.$input.attr("id") || _.guid();
|
||||
this.$menu.attr("id", id + "_listbox");
|
||||
this.$hint.attr({
|
||||
"aria-hidden": true
|
||||
});
|
||||
this.$input.attr({
|
||||
"aria-owns": id + "_listbox",
|
||||
role: "combobox",
|
||||
"aria-autocomplete": "list",
|
||||
"aria-expanded": false
|
||||
});
|
||||
this.query = this.$input.val();
|
||||
this.queryWhenFocused = this.hasFocus() ? this.query : null;
|
||||
this.$overflowHelper = buildOverflowHelper(this.$input);
|
||||
@@ -455,6 +510,7 @@
|
||||
if (this.$hint.length === 0) {
|
||||
this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop;
|
||||
}
|
||||
this.onSync("cursorchange", this._updateDescendent);
|
||||
}
|
||||
Input.normalizeQuery = function(str) {
|
||||
return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " ");
|
||||
@@ -524,6 +580,9 @@
|
||||
this.trigger("whitespaceChanged", this.query);
|
||||
}
|
||||
},
|
||||
_updateDescendent: function updateDescendent(event, id) {
|
||||
this.$input.attr("aria-activedescendant", id);
|
||||
},
|
||||
bind: function() {
|
||||
var that = this, onBlur, onFocus, onKeydown, onInput;
|
||||
onBlur = _.bind(this._onBlur, this);
|
||||
@@ -616,6 +675,9 @@
|
||||
this.$input.off(".tt");
|
||||
this.$overflowHelper.remove();
|
||||
this.$hint = this.$input = this.$overflowHelper = $("<div>");
|
||||
},
|
||||
setAriaExpanded: function setAriaExpanded(value) {
|
||||
this.$input.attr("aria-expanded", value);
|
||||
}
|
||||
});
|
||||
return Input;
|
||||
@@ -647,6 +709,7 @@
|
||||
"use strict";
|
||||
var keys, nameGenerator;
|
||||
keys = {
|
||||
dataset: "tt-selectable-dataset",
|
||||
val: "tt-selectable-display",
|
||||
obj: "tt-selectable-object"
|
||||
};
|
||||
@@ -666,19 +729,20 @@
|
||||
}
|
||||
www.mixin(this);
|
||||
this.highlight = !!o.highlight;
|
||||
this.name = o.name || nameGenerator();
|
||||
this.name = _.toStr(o.name || nameGenerator());
|
||||
this.limit = o.limit || 5;
|
||||
this.displayFn = getDisplayFn(o.display || o.displayKey);
|
||||
this.templates = getTemplates(o.templates, this.displayFn);
|
||||
this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source;
|
||||
this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async;
|
||||
this._resetLastSuggestion();
|
||||
this.$el = $(o.node).addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name);
|
||||
this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name);
|
||||
}
|
||||
Dataset.extractData = function extractData(el) {
|
||||
var $el = $(el);
|
||||
if ($el.data(keys.obj)) {
|
||||
return {
|
||||
dataset: $el.data(keys.dataset) || "",
|
||||
val: $el.data(keys.val) || "",
|
||||
obj: $el.data(keys.obj) || null
|
||||
};
|
||||
@@ -697,7 +761,7 @@
|
||||
} else {
|
||||
this._empty();
|
||||
}
|
||||
this.trigger("rendered", this.name, suggestions, false);
|
||||
this.trigger("rendered", suggestions, false, this.name);
|
||||
},
|
||||
_append: function append(query, suggestions) {
|
||||
suggestions = suggestions || [];
|
||||
@@ -708,7 +772,7 @@
|
||||
} else if (!this.$lastSuggestion.length && this.templates.notFound) {
|
||||
this._renderNotFound(query);
|
||||
}
|
||||
this.trigger("rendered", this.name, suggestions, true);
|
||||
this.trigger("rendered", suggestions, true, this.name);
|
||||
},
|
||||
_renderSuggestions: function renderSuggestions(query, suggestions) {
|
||||
var $fragment;
|
||||
@@ -749,7 +813,7 @@
|
||||
_.each(suggestions, function getSuggestionNode(suggestion) {
|
||||
var $el, context;
|
||||
context = that._injectQuery(query, suggestion);
|
||||
$el = $(that.templates.suggestion(context)).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable);
|
||||
$el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable);
|
||||
fragment.appendChild($el[0]);
|
||||
});
|
||||
this.highlight && highlight({
|
||||
@@ -787,7 +851,7 @@
|
||||
this.cancel = function cancel() {
|
||||
canceled = true;
|
||||
that.cancel = $.noop;
|
||||
that.async && that.trigger("asyncCanceled", query);
|
||||
that.async && that.trigger("asyncCanceled", query, that.name);
|
||||
};
|
||||
this.source(query, sync, async);
|
||||
!syncCalled && sync([]);
|
||||
@@ -800,16 +864,17 @@
|
||||
rendered = suggestions.length;
|
||||
that._overwrite(query, suggestions);
|
||||
if (rendered < that.limit && that.async) {
|
||||
that.trigger("asyncRequested", query);
|
||||
that.trigger("asyncRequested", query, that.name);
|
||||
}
|
||||
}
|
||||
function async(suggestions) {
|
||||
suggestions = suggestions || [];
|
||||
if (!canceled && rendered < that.limit) {
|
||||
that.cancel = $.noop;
|
||||
rendered += suggestions.length;
|
||||
that._append(query, suggestions.slice(0, that.limit - rendered));
|
||||
that.async && that.trigger("asyncReceived", query);
|
||||
var idx = Math.abs(rendered - that.limit);
|
||||
rendered += idx;
|
||||
that._append(query, suggestions.slice(0, idx));
|
||||
that.async && that.trigger("asyncReceived", query, that.name);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -840,10 +905,14 @@
|
||||
pending: templates.pending && _.templatify(templates.pending),
|
||||
header: templates.header && _.templatify(templates.header),
|
||||
footer: templates.footer && _.templatify(templates.footer),
|
||||
suggestion: templates.suggestion || suggestionTemplate
|
||||
suggestion: templates.suggestion ? userSuggestionTemplate : suggestionTemplate
|
||||
};
|
||||
function userSuggestionTemplate(context) {
|
||||
var template = templates.suggestion;
|
||||
return $(template(context)).attr("id", _.guid());
|
||||
}
|
||||
function suggestionTemplate(context) {
|
||||
return $("<div>").text(displayFn(context));
|
||||
return $('<div role="option">').attr("id", _.guid()).text(displayFn(context));
|
||||
}
|
||||
}
|
||||
function isValidName(str) {
|
||||
@@ -884,10 +953,11 @@
|
||||
this.trigger.apply(this, arguments);
|
||||
},
|
||||
_allDatasetsEmpty: function allDatasetsEmpty() {
|
||||
return _.every(this.datasets, isDatasetEmpty);
|
||||
function isDatasetEmpty(dataset) {
|
||||
return dataset.isEmpty();
|
||||
}
|
||||
return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) {
|
||||
var isEmpty = dataset.isEmpty();
|
||||
this.$node.attr("aria-expanded", !isEmpty);
|
||||
return isEmpty;
|
||||
}, this));
|
||||
},
|
||||
_getSelectables: function getSelectables() {
|
||||
return this.$node.find(this.selectors.selectable);
|
||||
@@ -912,6 +982,12 @@
|
||||
var that = this, onSelectableClick;
|
||||
onSelectableClick = _.bind(this._onSelectableClick, this);
|
||||
this.$node.on("click.tt", this.selectors.selectable, onSelectableClick);
|
||||
this.$node.on("mouseover", this.selectors.selectable, function() {
|
||||
that.setCursor($(this));
|
||||
});
|
||||
this.$node.on("mouseleave", function() {
|
||||
that._removeCursor();
|
||||
});
|
||||
_.each(this.datasets, function(dataset) {
|
||||
dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that);
|
||||
});
|
||||
@@ -921,9 +997,11 @@
|
||||
return this.$node.hasClass(this.classes.open);
|
||||
},
|
||||
open: function open() {
|
||||
this.$node.scrollTop(0);
|
||||
this.$node.addClass(this.classes.open);
|
||||
},
|
||||
close: function close() {
|
||||
this.$node.attr("aria-expanded", false);
|
||||
this.$node.removeClass(this.classes.open);
|
||||
this._removeCursor();
|
||||
},
|
||||
@@ -988,6 +1066,55 @@
|
||||
});
|
||||
return Menu;
|
||||
}();
|
||||
var Status = function() {
|
||||
"use strict";
|
||||
function Status(options) {
|
||||
this.$el = $("<span></span>", {
|
||||
role: "status",
|
||||
"aria-live": "polite"
|
||||
}).css({
|
||||
position: "absolute",
|
||||
padding: "0",
|
||||
border: "0",
|
||||
height: "1px",
|
||||
width: "1px",
|
||||
"margin-bottom": "-1px",
|
||||
"margin-right": "-1px",
|
||||
overflow: "hidden",
|
||||
clip: "rect(0 0 0 0)",
|
||||
"white-space": "nowrap"
|
||||
});
|
||||
options.$input.after(this.$el);
|
||||
_.each(options.menu.datasets, _.bind(function(dataset) {
|
||||
if (dataset.onSync) {
|
||||
dataset.onSync("rendered", _.bind(this.update, this));
|
||||
dataset.onSync("cleared", _.bind(this.cleared, this));
|
||||
}
|
||||
}, this));
|
||||
}
|
||||
_.mixin(Status.prototype, {
|
||||
update: function update(event, suggestions) {
|
||||
var length = suggestions.length;
|
||||
var words;
|
||||
if (length === 1) {
|
||||
words = {
|
||||
result: "result",
|
||||
is: "is"
|
||||
};
|
||||
} else {
|
||||
words = {
|
||||
result: "results",
|
||||
is: "are"
|
||||
};
|
||||
}
|
||||
this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate.");
|
||||
},
|
||||
cleared: function() {
|
||||
this.$el.text("");
|
||||
}
|
||||
});
|
||||
return Status;
|
||||
}();
|
||||
var DefaultMenu = function() {
|
||||
"use strict";
|
||||
var s = Menu.prototype;
|
||||
@@ -1052,6 +1179,7 @@
|
||||
this.input = o.input;
|
||||
this.menu = o.menu;
|
||||
this.enabled = true;
|
||||
this.autoselect = !!o.autoselect;
|
||||
this.active = false;
|
||||
this.input.hasFocus() && this.activate();
|
||||
this.dir = this.input.getLangDir();
|
||||
@@ -1098,8 +1226,12 @@
|
||||
_onDatasetCleared: function onDatasetCleared() {
|
||||
this._updateHint();
|
||||
},
|
||||
_onDatasetRendered: function onDatasetRendered(type, dataset, suggestions, async) {
|
||||
_onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) {
|
||||
this._updateHint();
|
||||
if (this.autoselect) {
|
||||
var cursorClass = this.selectors.cursor.substr(1);
|
||||
this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass);
|
||||
}
|
||||
this.eventBus.trigger("render", suggestions, async, dataset);
|
||||
},
|
||||
_onAsyncRequested: function onAsyncRequested(type, dataset, query) {
|
||||
@@ -1122,15 +1254,25 @@
|
||||
_onEnterKeyed: function onEnterKeyed(type, $e) {
|
||||
var $selectable;
|
||||
if ($selectable = this.menu.getActiveSelectable()) {
|
||||
this.select($selectable) && $e.preventDefault();
|
||||
if (this.select($selectable)) {
|
||||
$e.preventDefault();
|
||||
$e.stopPropagation();
|
||||
}
|
||||
} else if (this.autoselect) {
|
||||
if (this.select(this.menu.getTopSelectable())) {
|
||||
$e.preventDefault();
|
||||
$e.stopPropagation();
|
||||
}
|
||||
}
|
||||
},
|
||||
_onTabKeyed: function onTabKeyed(type, $e) {
|
||||
var $selectable;
|
||||
if ($selectable = this.menu.getActiveSelectable()) {
|
||||
this.select($selectable) && $e.preventDefault();
|
||||
} else if ($selectable = this.menu.getTopSelectable()) {
|
||||
this.autocomplete($selectable) && $e.preventDefault();
|
||||
} else if (this.autoselect) {
|
||||
if ($selectable = this.menu.getTopSelectable()) {
|
||||
this.autocomplete($selectable) && $e.preventDefault();
|
||||
}
|
||||
}
|
||||
},
|
||||
_onEscKeyed: function onEscKeyed() {
|
||||
@@ -1144,12 +1286,12 @@
|
||||
},
|
||||
_onLeftKeyed: function onLeftKeyed() {
|
||||
if (this.dir === "rtl" && this.input.isCursorAtEnd()) {
|
||||
this.autocomplete(this.menu.getTopSelectable());
|
||||
this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
|
||||
}
|
||||
},
|
||||
_onRightKeyed: function onRightKeyed() {
|
||||
if (this.dir === "ltr" && this.input.isCursorAtEnd()) {
|
||||
this.autocomplete(this.menu.getTopSelectable());
|
||||
this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
|
||||
}
|
||||
},
|
||||
_onQueryChanged: function onQueryChanged(e, query) {
|
||||
@@ -1226,6 +1368,7 @@
|
||||
},
|
||||
open: function open() {
|
||||
if (!this.isOpen() && !this.eventBus.before("open")) {
|
||||
this.input.setAriaExpanded(true);
|
||||
this.menu.open();
|
||||
this._updateHint();
|
||||
this.eventBus.trigger("open");
|
||||
@@ -1234,6 +1377,7 @@
|
||||
},
|
||||
close: function close() {
|
||||
if (this.isOpen() && !this.eventBus.before("close")) {
|
||||
this.input.setAriaExpanded(false);
|
||||
this.menu.close();
|
||||
this.input.clearHint();
|
||||
this.input.resetInputValue();
|
||||
@@ -1249,9 +1393,9 @@
|
||||
},
|
||||
select: function select($selectable) {
|
||||
var data = this.menu.getSelectableData($selectable);
|
||||
if (data && !this.eventBus.before("select", data.obj)) {
|
||||
if (data && !this.eventBus.before("select", data.obj, data.dataset)) {
|
||||
this.input.setQuery(data.val, true);
|
||||
this.eventBus.trigger("select", data.obj);
|
||||
this.eventBus.trigger("select", data.obj, data.dataset);
|
||||
this.close();
|
||||
return true;
|
||||
}
|
||||
@@ -1262,29 +1406,34 @@
|
||||
query = this.input.getQuery();
|
||||
data = this.menu.getSelectableData($selectable);
|
||||
isValid = data && query !== data.val;
|
||||
if (isValid && !this.eventBus.before("autocomplete", data.obj)) {
|
||||
if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) {
|
||||
this.input.setQuery(data.val);
|
||||
this.eventBus.trigger("autocomplete", data.obj);
|
||||
this.eventBus.trigger("autocomplete", data.obj, data.dataset);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
moveCursor: function moveCursor(delta) {
|
||||
var query, $candidate, data, payload, cancelMove;
|
||||
var query, $candidate, data, suggestion, datasetName, cancelMove, id;
|
||||
query = this.input.getQuery();
|
||||
$candidate = this.menu.selectableRelativeToCursor(delta);
|
||||
data = this.menu.getSelectableData($candidate);
|
||||
payload = data ? data.obj : null;
|
||||
suggestion = data ? data.obj : null;
|
||||
datasetName = data ? data.dataset : null;
|
||||
id = $candidate ? $candidate.attr("id") : null;
|
||||
this.input.trigger("cursorchange", id);
|
||||
cancelMove = this._minLengthMet() && this.menu.update(query);
|
||||
if (!cancelMove && !this.eventBus.before("cursorchange", payload)) {
|
||||
if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) {
|
||||
this.menu.setCursor($candidate);
|
||||
if (data) {
|
||||
this.input.setInputValue(data.val);
|
||||
if (typeof data.val === "string") {
|
||||
this.input.setInputValue(data.val);
|
||||
}
|
||||
} else {
|
||||
this.input.resetInputValue();
|
||||
this._updateHint();
|
||||
}
|
||||
this.eventBus.trigger("cursorchange", payload);
|
||||
this.eventBus.trigger("cursorchange", suggestion, datasetName);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -1322,7 +1471,7 @@
|
||||
www = WWW(o.classNames);
|
||||
return this.each(attach);
|
||||
function attach() {
|
||||
var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, typeahead, MenuConstructor;
|
||||
var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor;
|
||||
_.each(datasets, function(d) {
|
||||
d.highlight = !!o.highlight;
|
||||
});
|
||||
@@ -1347,17 +1496,23 @@
|
||||
});
|
||||
input = new Input({
|
||||
hint: $hint,
|
||||
input: $input
|
||||
input: $input,
|
||||
menu: $menu
|
||||
}, www);
|
||||
menu = new MenuConstructor({
|
||||
node: $menu,
|
||||
datasets: datasets
|
||||
}, www);
|
||||
status = new Status({
|
||||
$input: $input,
|
||||
menu: menu
|
||||
});
|
||||
typeahead = new Typeahead({
|
||||
input: input,
|
||||
menu: menu,
|
||||
eventBus: eventBus,
|
||||
minLength: o.minLength
|
||||
minLength: o.minLength,
|
||||
autoselect: o.autoselect
|
||||
}, www);
|
||||
$input.data(keys.www, www);
|
||||
$input.data(keys.typeahead, typeahead);
|
||||
@@ -1450,7 +1605,7 @@
|
||||
return query;
|
||||
} else {
|
||||
ttEach(this, function(t) {
|
||||
t.setVal(newVal);
|
||||
t.setVal(_.toStr(newVal));
|
||||
});
|
||||
return this;
|
||||
}
|
||||
@@ -1481,8 +1636,10 @@
|
||||
});
|
||||
}
|
||||
function buildHintFromInput($input, www) {
|
||||
return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop("readonly", true).removeAttr("id name placeholder required").attr({
|
||||
autocomplete: "off",
|
||||
return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({
|
||||
readonly: true,
|
||||
required: false
|
||||
}).removeAttr("id name placeholder").removeClass("required").attr({
|
||||
spellcheck: "false",
|
||||
tabindex: -1
|
||||
});
|
||||
@@ -1495,7 +1652,6 @@
|
||||
style: $input.attr("style")
|
||||
});
|
||||
$input.addClass(www.classes.input).attr({
|
||||
autocomplete: "off",
|
||||
spellcheck: false
|
||||
});
|
||||
try {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
+39
-10
@@ -32,7 +32,7 @@
|
||||
</p>
|
||||
|
||||
<p class="header-col header-col--secondary">
|
||||
<a class="header-link" href="https://github.com/IBM-Swift/Swift-SMTP/">
|
||||
<a class="header-link" href="https://github.com/Kitura/Swift-SMTP/">
|
||||
<img class="header-icon" src="img/gh.png"/>
|
||||
View on GitHub
|
||||
</a>
|
||||
@@ -99,15 +99,15 @@
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="section-content top-matter">
|
||||
|
||||
<h1 id='swift-smtp' class='heading'>Swift-SMTP</h1>
|
||||
|
||||
<p><img src="https://github.com/IBM-Swift/Swift-SMTP/blob/master/Assets/swift-smtp-bird.png?raw=true" alt="Swift-SMTP bird"></p>
|
||||
<p><img src="https://github.com/Kitura/Swift-SMTP/blob/master/Assets/swift-smtp-bird.png?raw=true" alt="Swift-SMTP bird"></p>
|
||||
|
||||
<p>Swift SMTP client.</p>
|
||||
|
||||
<p><img src="https://travis-ci.org/IBM-Swift/Swift-SMTP.svg?branch=master" alt="Build Status">
|
||||
<p><img src="https://travis-ci.org/Kitura/Swift-SMTP.svg?branch=master" alt="Build Status">
|
||||
<img src="https://img.shields.io/badge/os-macOS-green.svg?style=flat" alt="macOS">
|
||||
<img src="https://img.shields.io/badge/os-linux-green.svg?style=flat" alt="Linux">
|
||||
<img src="https://img.shields.io/badge/license-Apache2-blue.svg?style=flat" alt="Apache 2"></p>
|
||||
@@ -118,14 +118,43 @@
|
||||
<li>Authenticate with CRAM-MD5, LOGIN, PLAIN, or XOAUTH2</li>
|
||||
<li>Send emails with local file, HTML, and raw data attachments</li>
|
||||
<li>Add custom headers</li>
|
||||
<li><a href="https://ibm-swift.github.io/Swift-SMTP/">Documentation</a></li>
|
||||
<li><a href="https://kitura.github.io/Swift-SMTP/">Documentation</a></li>
|
||||
</ul>
|
||||
<h2 id='swift-version' class='heading'>Swift Version</h2>
|
||||
|
||||
<p>macOS & Linux: <code>Swift 4.0.3</code> or <code>Swift 4.1</code></p>
|
||||
<p>macOS & Linux: <code>Swift 4.0.3</code>, <code>Swift 4.1</code> and <code>Swift 4.1.2</code></p>
|
||||
<h2 id='installation' class='heading'>Installation</h2>
|
||||
|
||||
<p>You can add <code>SwiftSMTP</code> to your project using <a href="https://swift.org/package-manager/">Swift Package Manager</a>. If your project does not have a <code>Package.swift</code> file, create one by running <code>swift package init</code> in the root directory of your project. Then open <code>Package.swift</code> and add <code>SwiftSMTP</code> as a dependency. Be sure to add it to your desired targets as well:</p>
|
||||
<pre class="highlight swift"><code><span class="c1">// swift-tools-version:4.0</span>
|
||||
|
||||
<span class="kd">import</span> <span class="kt">PackageDescription</span>
|
||||
|
||||
<span class="k">let</span> <span class="nv">package</span> <span class="o">=</span> <span class="kt">Package</span><span class="p">(</span>
|
||||
<span class="nv">name</span><span class="p">:</span> <span class="s">"MyProject"</span><span class="p">,</span>
|
||||
<span class="nv">products</span><span class="p">:</span> <span class="p">[</span>
|
||||
<span class="o">.</span><span class="nf">library</span><span class="p">(</span>
|
||||
<span class="nv">name</span><span class="p">:</span> <span class="s">"MyProject"</span><span class="p">,</span>
|
||||
<span class="nv">targets</span><span class="p">:</span> <span class="p">[</span><span class="s">"MyProject"</span><span class="p">]),</span>
|
||||
<span class="p">],</span>
|
||||
<span class="nv">dependencies</span><span class="p">:</span> <span class="p">[</span>
|
||||
<span class="o">.</span><span class="nf">package</span><span class="p">(</span><span class="nv">url</span><span class="p">:</span> <span class="s">"https://github.com/Kitura/Swift-SMTP"</span><span class="p">,</span> <span class="o">.</span><span class="nf">upToNextMinor</span><span class="p">(</span><span class="nv">from</span><span class="p">:</span> <span class="s">"5.1.0"</span><span class="p">)),</span> <span class="c1">// add the dependency</span>
|
||||
<span class="p">],</span>
|
||||
<span class="nv">targets</span><span class="p">:</span> <span class="p">[</span>
|
||||
<span class="o">.</span><span class="nf">target</span><span class="p">(</span>
|
||||
<span class="nv">name</span><span class="p">:</span> <span class="s">"MyProject"</span><span class="p">,</span>
|
||||
<span class="nv">dependencies</span><span class="p">:</span> <span class="p">[</span><span class="s">"SwiftSMTP"</span><span class="p">]),</span> <span class="c1">// add targets</span>
|
||||
<span class="o">.</span><span class="nf">testTarget</span><span class="p">(</span> <span class="c1">// note "SwiftSMTP" (NO HYPHEN)</span>
|
||||
<span class="nv">name</span><span class="p">:</span> <span class="s">"MyProjectTests"</span><span class="p">,</span>
|
||||
<span class="nv">dependencies</span><span class="p">:</span> <span class="p">[</span><span class="s">"MyProject"</span><span class="p">]),</span>
|
||||
<span class="p">]</span>
|
||||
<span class="p">)</span>
|
||||
</code></pre>
|
||||
|
||||
<p>After adding the dependency and saving, run <code>swift package generate-xcodeproj</code> in the root directory of your project. This will fetch dependencies and create an Xcode project which you can open and begin editing.</p>
|
||||
<h2 id='migration-guide' class='heading'>Migration Guide</h2>
|
||||
|
||||
<p>Version <code>5.0.0</code> brings breaking changes. See the quick migration guide <a href="https://github.com/IBM-Swift/Swift-SMTP/blob/master/migration-guide.md">here</a>.</p>
|
||||
<p>Version <code>5.0.0</code> brings breaking changes. See the quick migration guide <a href="https://github.com/Kitura/Swift-SMTP/blob/master/migration-guide.md">here</a>.</p>
|
||||
<h2 id='usage' class='heading'>Usage</h2>
|
||||
|
||||
<p>Initialize an <code><a href="Structs/SMTP.html">SMTP</a></code> instance:</p>
|
||||
@@ -151,7 +180,7 @@
|
||||
<span class="nv">timeout</span><span class="p">:</span> <span class="kt">UInt</span> <span class="o">=</span> <span class="mi">10</span><span class="p">)</span>
|
||||
</code></pre>
|
||||
|
||||
<p>By default, the <code><a href="Structs/SMTP.html">SMTP</a></code> struct connects on port <code>587</code> and sends mail only if a TLS connection can be established. It also uses a <code><a href="Structs/TLSConfiguration.html">TLSConfiguration</a></code> that uses no backing certificates. View the <a href="https://ibm-swift.github.io/Swift-SMTP/">docs</a> for more configuration options.</p>
|
||||
<p>By default, the <code><a href="Structs/SMTP.html">SMTP</a></code> struct connects on port <code>587</code> and sends mail only if a TLS connection can be established. It also uses a <code><a href="Structs/TLSConfiguration.html">TLSConfiguration</a></code> that uses no backing certificates. View the <a href="https://kitura.github.io/Swift-SMTP/">docs</a> for more configuration options.</p>
|
||||
<h3 id='send-email' class='heading'>Send email</h3>
|
||||
|
||||
<p>Create a <code><a href="Structs/Mail.html">Mail</a></code> object and use your <code><a href="Structs/SMTP.html">SMTP</a></code> handle to send it. To set the sender and receiver of an email, use the <code>User</code> struct:</p>
|
||||
@@ -259,8 +288,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2018-06-26)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2020 <a class="link" href="" target="_blank" rel="external">IBM and Kitura project contributors</a>. All rights reserved. (Last updated: 2020-12-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+45
-18
@@ -8,26 +8,41 @@ if (navigator.userAgent.match(/xcode/i)) {
|
||||
window.jazzy.docset = true
|
||||
}
|
||||
|
||||
// On doc load, toggle the URL hash discussion if present
|
||||
$(document).ready(function() {
|
||||
if (!window.jazzy.docset) {
|
||||
var linkToHash = $('a[href="' + window.location.hash +'"]');
|
||||
linkToHash.trigger("click");
|
||||
}
|
||||
});
|
||||
function toggleItem($link, $content) {
|
||||
var animationDuration = 300;
|
||||
$link.toggleClass('token-open');
|
||||
$content.slideToggle(animationDuration);
|
||||
}
|
||||
|
||||
// On token click, toggle its discussion and animate token.marginLeft
|
||||
$(".token").click(function(event) {
|
||||
function itemLinkToContent($link) {
|
||||
return $link.parent().parent().next();
|
||||
}
|
||||
|
||||
// On doc load + hash-change, open any targetted item
|
||||
function openCurrentItemIfClosed() {
|
||||
if (window.jazzy.docset) {
|
||||
return;
|
||||
}
|
||||
var link = $(this);
|
||||
var animationDuration = 300;
|
||||
$content = link.parent().parent().next();
|
||||
$content.slideToggle(animationDuration);
|
||||
var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token');
|
||||
$content = itemLinkToContent($link);
|
||||
if ($content.is(':hidden')) {
|
||||
toggleItem($link, $content);
|
||||
}
|
||||
}
|
||||
|
||||
$(openCurrentItemIfClosed);
|
||||
$(window).on('hashchange', openCurrentItemIfClosed);
|
||||
|
||||
// On item link ('token') click, toggle its discussion
|
||||
$('.token').on('click', function(event) {
|
||||
if (window.jazzy.docset) {
|
||||
return;
|
||||
}
|
||||
var $link = $(this);
|
||||
toggleItem($link, itemLinkToContent($link));
|
||||
|
||||
// Keeps the document from jumping to the hash.
|
||||
var href = $(this).attr('href');
|
||||
var href = $link.attr('href');
|
||||
if (history.pushState) {
|
||||
history.pushState({}, '', href);
|
||||
} else {
|
||||
@@ -36,8 +51,20 @@ $(".token").click(function(event) {
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
// Dumb down quotes within code blocks that delimit strings instead of quotations
|
||||
// https://github.com/realm/jazzy/issues/714
|
||||
$("code q").replaceWith(function () {
|
||||
return ["\"", $(this).contents(), "\""];
|
||||
// Clicks on links to the current, closed, item need to open the item
|
||||
$("a:not('.token')").on('click', function() {
|
||||
if (location == this.href) {
|
||||
openCurrentItemIfClosed();
|
||||
}
|
||||
});
|
||||
|
||||
// KaTeX rendering
|
||||
if ("katex" in window) {
|
||||
$($('.math').each( (_, element) => {
|
||||
katex.render(element.textContent, element, {
|
||||
displayMode: $(element).hasClass('m-block'),
|
||||
throwOnError: false,
|
||||
trust: true
|
||||
});
|
||||
}))
|
||||
}
|
||||
|
||||
+17
-9
@@ -1,9 +1,4 @@
|
||||
$(function(){
|
||||
var searchIndex = lunr(function() {
|
||||
this.ref('url');
|
||||
this.field('name');
|
||||
});
|
||||
|
||||
var $typeahead = $('[data-typeahead]');
|
||||
var $form = $typeahead.parents('form');
|
||||
var searchURL = $form.attr('action');
|
||||
@@ -26,21 +21,34 @@ $(function(){
|
||||
$form.addClass('loading');
|
||||
|
||||
$.getJSON(searchURL).then(function(searchData) {
|
||||
$.each(searchData, function (url, doc) {
|
||||
searchIndex.add({url: url, name: doc.name});
|
||||
const searchIndex = lunr(function() {
|
||||
this.ref('url');
|
||||
this.field('name');
|
||||
this.field('abstract');
|
||||
for (const [url, doc] of Object.entries(searchData)) {
|
||||
this.add({url: url, name: doc.name, abstract: doc.abstract});
|
||||
}
|
||||
});
|
||||
|
||||
$typeahead.typeahead(
|
||||
{
|
||||
highlight: true,
|
||||
minLength: 3
|
||||
minLength: 3,
|
||||
autoselect: true
|
||||
},
|
||||
{
|
||||
limit: 10,
|
||||
display: displayTemplate,
|
||||
templates: { suggestion: suggestionTemplate },
|
||||
source: function(query, sync) {
|
||||
var results = searchIndex.search(query).map(function(result) {
|
||||
const lcSearch = query.toLowerCase();
|
||||
const results = searchIndex.query(function(q) {
|
||||
q.term(lcSearch, { boost: 100 });
|
||||
q.term(lcSearch, {
|
||||
boost: 10,
|
||||
wildcard: lunr.Query.wildcard.TRAILING
|
||||
});
|
||||
}).map(function(result) {
|
||||
var doc = searchData[result.ref];
|
||||
doc.url = result.ref;
|
||||
return doc;
|
||||
|
||||
+2
-4
File diff suppressed because one or more lines are too long
+3
-3
File diff suppressed because one or more lines are too long
+209
-53
@@ -1,18 +1,19 @@
|
||||
/*!
|
||||
* typeahead.js 0.11.1
|
||||
* https://github.com/twitter/typeahead.js
|
||||
* Copyright 2013-2015 Twitter, Inc. and other contributors; Licensed MIT
|
||||
* typeahead.js 1.3.1
|
||||
* https://github.com/corejavascript/typeahead.js
|
||||
* Copyright 2013-2020 Twitter, Inc. and other contributors; Licensed MIT
|
||||
*/
|
||||
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define("typeahead.js", [ "jquery" ], function(a0) {
|
||||
define([ "jquery" ], function(a0) {
|
||||
return factory(a0);
|
||||
});
|
||||
} else if (typeof exports === "object") {
|
||||
} else if (typeof module === "object" && module.exports) {
|
||||
module.exports = factory(require("jquery"));
|
||||
} else {
|
||||
factory(jQuery);
|
||||
factory(root["jQuery"]);
|
||||
}
|
||||
})(this, function($) {
|
||||
var _ = function() {
|
||||
@@ -148,6 +149,13 @@
|
||||
stringify: function(val) {
|
||||
return _.isString(val) ? val : JSON.stringify(val);
|
||||
},
|
||||
guid: function() {
|
||||
function _p8(s) {
|
||||
var p = (Math.random().toString(16) + "000000000").substr(2, 8);
|
||||
return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p;
|
||||
}
|
||||
return "tt-" + _p8() + _p8(true) + _p8(true) + _p8();
|
||||
},
|
||||
noop: function() {}
|
||||
};
|
||||
}();
|
||||
@@ -189,7 +197,7 @@
|
||||
function buildHtml(c) {
|
||||
return {
|
||||
wrapper: '<span class="' + c.wrapper + '"></span>',
|
||||
menu: '<div class="' + c.menu + '"></div>'
|
||||
menu: '<div role="listbox" class="' + c.menu + '"></div>'
|
||||
};
|
||||
}
|
||||
function buildSelectors(classes) {
|
||||
@@ -264,10 +272,8 @@
|
||||
}
|
||||
_.mixin(EventBus.prototype, {
|
||||
_trigger: function(type, args) {
|
||||
var $e;
|
||||
$e = $.Event(namespace + type);
|
||||
(args = args || []).unshift($e);
|
||||
this.$el.trigger.apply(this.$el, args);
|
||||
var $e = $.Event(namespace + type);
|
||||
this.$el.trigger.call(this.$el, $e, args || []);
|
||||
return $e;
|
||||
},
|
||||
before: function(type) {
|
||||
@@ -384,7 +390,36 @@
|
||||
tagName: "strong",
|
||||
className: null,
|
||||
wordsOnly: false,
|
||||
caseSensitive: false
|
||||
caseSensitive: false,
|
||||
diacriticInsensitive: false
|
||||
};
|
||||
var accented = {
|
||||
A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]",
|
||||
B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]",
|
||||
C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]",
|
||||
D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]",
|
||||
E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]",
|
||||
F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]",
|
||||
G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]",
|
||||
H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]",
|
||||
I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]",
|
||||
J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]",
|
||||
K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]",
|
||||
L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]",
|
||||
M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]",
|
||||
N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]",
|
||||
O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]",
|
||||
P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]",
|
||||
Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]",
|
||||
R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]",
|
||||
S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]",
|
||||
T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]",
|
||||
U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]",
|
||||
V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]",
|
||||
W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]",
|
||||
X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]",
|
||||
Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]",
|
||||
Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]"
|
||||
};
|
||||
return function hightlight(o) {
|
||||
var regex;
|
||||
@@ -393,7 +428,7 @@
|
||||
return;
|
||||
}
|
||||
o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ];
|
||||
regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly);
|
||||
regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive);
|
||||
traverse(o.node, hightlightTextNode);
|
||||
function hightlightTextNode(textNode) {
|
||||
var match, patternNode, wrapperNode;
|
||||
@@ -419,10 +454,17 @@
|
||||
}
|
||||
}
|
||||
};
|
||||
function getRegex(patterns, caseSensitive, wordsOnly) {
|
||||
function accent_replacer(chr) {
|
||||
return accented[chr.toUpperCase()] || chr;
|
||||
}
|
||||
function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) {
|
||||
var escapedPatterns = [], regexStr;
|
||||
for (var i = 0, len = patterns.length; i < len; i++) {
|
||||
escapedPatterns.push(_.escapeRegExChars(patterns[i]));
|
||||
var escapedWord = _.escapeRegExChars(patterns[i]);
|
||||
if (diacriticInsensitive) {
|
||||
escapedWord = escapedWord.replace(/\S/g, accent_replacer);
|
||||
}
|
||||
escapedPatterns.push(escapedWord);
|
||||
}
|
||||
regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")";
|
||||
return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i");
|
||||
@@ -441,6 +483,7 @@
|
||||
40: "down"
|
||||
};
|
||||
function Input(o, www) {
|
||||
var id;
|
||||
o = o || {};
|
||||
if (!o.input) {
|
||||
$.error("input is missing");
|
||||
@@ -448,6 +491,18 @@
|
||||
www.mixin(this);
|
||||
this.$hint = $(o.hint);
|
||||
this.$input = $(o.input);
|
||||
this.$menu = $(o.menu);
|
||||
id = this.$input.attr("id") || _.guid();
|
||||
this.$menu.attr("id", id + "_listbox");
|
||||
this.$hint.attr({
|
||||
"aria-hidden": true
|
||||
});
|
||||
this.$input.attr({
|
||||
"aria-owns": id + "_listbox",
|
||||
role: "combobox",
|
||||
"aria-autocomplete": "list",
|
||||
"aria-expanded": false
|
||||
});
|
||||
this.query = this.$input.val();
|
||||
this.queryWhenFocused = this.hasFocus() ? this.query : null;
|
||||
this.$overflowHelper = buildOverflowHelper(this.$input);
|
||||
@@ -455,6 +510,7 @@
|
||||
if (this.$hint.length === 0) {
|
||||
this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop;
|
||||
}
|
||||
this.onSync("cursorchange", this._updateDescendent);
|
||||
}
|
||||
Input.normalizeQuery = function(str) {
|
||||
return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " ");
|
||||
@@ -524,6 +580,9 @@
|
||||
this.trigger("whitespaceChanged", this.query);
|
||||
}
|
||||
},
|
||||
_updateDescendent: function updateDescendent(event, id) {
|
||||
this.$input.attr("aria-activedescendant", id);
|
||||
},
|
||||
bind: function() {
|
||||
var that = this, onBlur, onFocus, onKeydown, onInput;
|
||||
onBlur = _.bind(this._onBlur, this);
|
||||
@@ -616,6 +675,9 @@
|
||||
this.$input.off(".tt");
|
||||
this.$overflowHelper.remove();
|
||||
this.$hint = this.$input = this.$overflowHelper = $("<div>");
|
||||
},
|
||||
setAriaExpanded: function setAriaExpanded(value) {
|
||||
this.$input.attr("aria-expanded", value);
|
||||
}
|
||||
});
|
||||
return Input;
|
||||
@@ -647,6 +709,7 @@
|
||||
"use strict";
|
||||
var keys, nameGenerator;
|
||||
keys = {
|
||||
dataset: "tt-selectable-dataset",
|
||||
val: "tt-selectable-display",
|
||||
obj: "tt-selectable-object"
|
||||
};
|
||||
@@ -666,19 +729,20 @@
|
||||
}
|
||||
www.mixin(this);
|
||||
this.highlight = !!o.highlight;
|
||||
this.name = o.name || nameGenerator();
|
||||
this.name = _.toStr(o.name || nameGenerator());
|
||||
this.limit = o.limit || 5;
|
||||
this.displayFn = getDisplayFn(o.display || o.displayKey);
|
||||
this.templates = getTemplates(o.templates, this.displayFn);
|
||||
this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source;
|
||||
this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async;
|
||||
this._resetLastSuggestion();
|
||||
this.$el = $(o.node).addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name);
|
||||
this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name);
|
||||
}
|
||||
Dataset.extractData = function extractData(el) {
|
||||
var $el = $(el);
|
||||
if ($el.data(keys.obj)) {
|
||||
return {
|
||||
dataset: $el.data(keys.dataset) || "",
|
||||
val: $el.data(keys.val) || "",
|
||||
obj: $el.data(keys.obj) || null
|
||||
};
|
||||
@@ -697,7 +761,7 @@
|
||||
} else {
|
||||
this._empty();
|
||||
}
|
||||
this.trigger("rendered", this.name, suggestions, false);
|
||||
this.trigger("rendered", suggestions, false, this.name);
|
||||
},
|
||||
_append: function append(query, suggestions) {
|
||||
suggestions = suggestions || [];
|
||||
@@ -708,7 +772,7 @@
|
||||
} else if (!this.$lastSuggestion.length && this.templates.notFound) {
|
||||
this._renderNotFound(query);
|
||||
}
|
||||
this.trigger("rendered", this.name, suggestions, true);
|
||||
this.trigger("rendered", suggestions, true, this.name);
|
||||
},
|
||||
_renderSuggestions: function renderSuggestions(query, suggestions) {
|
||||
var $fragment;
|
||||
@@ -749,7 +813,7 @@
|
||||
_.each(suggestions, function getSuggestionNode(suggestion) {
|
||||
var $el, context;
|
||||
context = that._injectQuery(query, suggestion);
|
||||
$el = $(that.templates.suggestion(context)).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable);
|
||||
$el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable);
|
||||
fragment.appendChild($el[0]);
|
||||
});
|
||||
this.highlight && highlight({
|
||||
@@ -787,7 +851,7 @@
|
||||
this.cancel = function cancel() {
|
||||
canceled = true;
|
||||
that.cancel = $.noop;
|
||||
that.async && that.trigger("asyncCanceled", query);
|
||||
that.async && that.trigger("asyncCanceled", query, that.name);
|
||||
};
|
||||
this.source(query, sync, async);
|
||||
!syncCalled && sync([]);
|
||||
@@ -800,16 +864,17 @@
|
||||
rendered = suggestions.length;
|
||||
that._overwrite(query, suggestions);
|
||||
if (rendered < that.limit && that.async) {
|
||||
that.trigger("asyncRequested", query);
|
||||
that.trigger("asyncRequested", query, that.name);
|
||||
}
|
||||
}
|
||||
function async(suggestions) {
|
||||
suggestions = suggestions || [];
|
||||
if (!canceled && rendered < that.limit) {
|
||||
that.cancel = $.noop;
|
||||
rendered += suggestions.length;
|
||||
that._append(query, suggestions.slice(0, that.limit - rendered));
|
||||
that.async && that.trigger("asyncReceived", query);
|
||||
var idx = Math.abs(rendered - that.limit);
|
||||
rendered += idx;
|
||||
that._append(query, suggestions.slice(0, idx));
|
||||
that.async && that.trigger("asyncReceived", query, that.name);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -840,10 +905,14 @@
|
||||
pending: templates.pending && _.templatify(templates.pending),
|
||||
header: templates.header && _.templatify(templates.header),
|
||||
footer: templates.footer && _.templatify(templates.footer),
|
||||
suggestion: templates.suggestion || suggestionTemplate
|
||||
suggestion: templates.suggestion ? userSuggestionTemplate : suggestionTemplate
|
||||
};
|
||||
function userSuggestionTemplate(context) {
|
||||
var template = templates.suggestion;
|
||||
return $(template(context)).attr("id", _.guid());
|
||||
}
|
||||
function suggestionTemplate(context) {
|
||||
return $("<div>").text(displayFn(context));
|
||||
return $('<div role="option">').attr("id", _.guid()).text(displayFn(context));
|
||||
}
|
||||
}
|
||||
function isValidName(str) {
|
||||
@@ -884,10 +953,11 @@
|
||||
this.trigger.apply(this, arguments);
|
||||
},
|
||||
_allDatasetsEmpty: function allDatasetsEmpty() {
|
||||
return _.every(this.datasets, isDatasetEmpty);
|
||||
function isDatasetEmpty(dataset) {
|
||||
return dataset.isEmpty();
|
||||
}
|
||||
return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) {
|
||||
var isEmpty = dataset.isEmpty();
|
||||
this.$node.attr("aria-expanded", !isEmpty);
|
||||
return isEmpty;
|
||||
}, this));
|
||||
},
|
||||
_getSelectables: function getSelectables() {
|
||||
return this.$node.find(this.selectors.selectable);
|
||||
@@ -912,6 +982,12 @@
|
||||
var that = this, onSelectableClick;
|
||||
onSelectableClick = _.bind(this._onSelectableClick, this);
|
||||
this.$node.on("click.tt", this.selectors.selectable, onSelectableClick);
|
||||
this.$node.on("mouseover", this.selectors.selectable, function() {
|
||||
that.setCursor($(this));
|
||||
});
|
||||
this.$node.on("mouseleave", function() {
|
||||
that._removeCursor();
|
||||
});
|
||||
_.each(this.datasets, function(dataset) {
|
||||
dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that);
|
||||
});
|
||||
@@ -921,9 +997,11 @@
|
||||
return this.$node.hasClass(this.classes.open);
|
||||
},
|
||||
open: function open() {
|
||||
this.$node.scrollTop(0);
|
||||
this.$node.addClass(this.classes.open);
|
||||
},
|
||||
close: function close() {
|
||||
this.$node.attr("aria-expanded", false);
|
||||
this.$node.removeClass(this.classes.open);
|
||||
this._removeCursor();
|
||||
},
|
||||
@@ -988,6 +1066,55 @@
|
||||
});
|
||||
return Menu;
|
||||
}();
|
||||
var Status = function() {
|
||||
"use strict";
|
||||
function Status(options) {
|
||||
this.$el = $("<span></span>", {
|
||||
role: "status",
|
||||
"aria-live": "polite"
|
||||
}).css({
|
||||
position: "absolute",
|
||||
padding: "0",
|
||||
border: "0",
|
||||
height: "1px",
|
||||
width: "1px",
|
||||
"margin-bottom": "-1px",
|
||||
"margin-right": "-1px",
|
||||
overflow: "hidden",
|
||||
clip: "rect(0 0 0 0)",
|
||||
"white-space": "nowrap"
|
||||
});
|
||||
options.$input.after(this.$el);
|
||||
_.each(options.menu.datasets, _.bind(function(dataset) {
|
||||
if (dataset.onSync) {
|
||||
dataset.onSync("rendered", _.bind(this.update, this));
|
||||
dataset.onSync("cleared", _.bind(this.cleared, this));
|
||||
}
|
||||
}, this));
|
||||
}
|
||||
_.mixin(Status.prototype, {
|
||||
update: function update(event, suggestions) {
|
||||
var length = suggestions.length;
|
||||
var words;
|
||||
if (length === 1) {
|
||||
words = {
|
||||
result: "result",
|
||||
is: "is"
|
||||
};
|
||||
} else {
|
||||
words = {
|
||||
result: "results",
|
||||
is: "are"
|
||||
};
|
||||
}
|
||||
this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate.");
|
||||
},
|
||||
cleared: function() {
|
||||
this.$el.text("");
|
||||
}
|
||||
});
|
||||
return Status;
|
||||
}();
|
||||
var DefaultMenu = function() {
|
||||
"use strict";
|
||||
var s = Menu.prototype;
|
||||
@@ -1052,6 +1179,7 @@
|
||||
this.input = o.input;
|
||||
this.menu = o.menu;
|
||||
this.enabled = true;
|
||||
this.autoselect = !!o.autoselect;
|
||||
this.active = false;
|
||||
this.input.hasFocus() && this.activate();
|
||||
this.dir = this.input.getLangDir();
|
||||
@@ -1098,8 +1226,12 @@
|
||||
_onDatasetCleared: function onDatasetCleared() {
|
||||
this._updateHint();
|
||||
},
|
||||
_onDatasetRendered: function onDatasetRendered(type, dataset, suggestions, async) {
|
||||
_onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) {
|
||||
this._updateHint();
|
||||
if (this.autoselect) {
|
||||
var cursorClass = this.selectors.cursor.substr(1);
|
||||
this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass);
|
||||
}
|
||||
this.eventBus.trigger("render", suggestions, async, dataset);
|
||||
},
|
||||
_onAsyncRequested: function onAsyncRequested(type, dataset, query) {
|
||||
@@ -1122,15 +1254,25 @@
|
||||
_onEnterKeyed: function onEnterKeyed(type, $e) {
|
||||
var $selectable;
|
||||
if ($selectable = this.menu.getActiveSelectable()) {
|
||||
this.select($selectable) && $e.preventDefault();
|
||||
if (this.select($selectable)) {
|
||||
$e.preventDefault();
|
||||
$e.stopPropagation();
|
||||
}
|
||||
} else if (this.autoselect) {
|
||||
if (this.select(this.menu.getTopSelectable())) {
|
||||
$e.preventDefault();
|
||||
$e.stopPropagation();
|
||||
}
|
||||
}
|
||||
},
|
||||
_onTabKeyed: function onTabKeyed(type, $e) {
|
||||
var $selectable;
|
||||
if ($selectable = this.menu.getActiveSelectable()) {
|
||||
this.select($selectable) && $e.preventDefault();
|
||||
} else if ($selectable = this.menu.getTopSelectable()) {
|
||||
this.autocomplete($selectable) && $e.preventDefault();
|
||||
} else if (this.autoselect) {
|
||||
if ($selectable = this.menu.getTopSelectable()) {
|
||||
this.autocomplete($selectable) && $e.preventDefault();
|
||||
}
|
||||
}
|
||||
},
|
||||
_onEscKeyed: function onEscKeyed() {
|
||||
@@ -1144,12 +1286,12 @@
|
||||
},
|
||||
_onLeftKeyed: function onLeftKeyed() {
|
||||
if (this.dir === "rtl" && this.input.isCursorAtEnd()) {
|
||||
this.autocomplete(this.menu.getTopSelectable());
|
||||
this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
|
||||
}
|
||||
},
|
||||
_onRightKeyed: function onRightKeyed() {
|
||||
if (this.dir === "ltr" && this.input.isCursorAtEnd()) {
|
||||
this.autocomplete(this.menu.getTopSelectable());
|
||||
this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
|
||||
}
|
||||
},
|
||||
_onQueryChanged: function onQueryChanged(e, query) {
|
||||
@@ -1226,6 +1368,7 @@
|
||||
},
|
||||
open: function open() {
|
||||
if (!this.isOpen() && !this.eventBus.before("open")) {
|
||||
this.input.setAriaExpanded(true);
|
||||
this.menu.open();
|
||||
this._updateHint();
|
||||
this.eventBus.trigger("open");
|
||||
@@ -1234,6 +1377,7 @@
|
||||
},
|
||||
close: function close() {
|
||||
if (this.isOpen() && !this.eventBus.before("close")) {
|
||||
this.input.setAriaExpanded(false);
|
||||
this.menu.close();
|
||||
this.input.clearHint();
|
||||
this.input.resetInputValue();
|
||||
@@ -1249,9 +1393,9 @@
|
||||
},
|
||||
select: function select($selectable) {
|
||||
var data = this.menu.getSelectableData($selectable);
|
||||
if (data && !this.eventBus.before("select", data.obj)) {
|
||||
if (data && !this.eventBus.before("select", data.obj, data.dataset)) {
|
||||
this.input.setQuery(data.val, true);
|
||||
this.eventBus.trigger("select", data.obj);
|
||||
this.eventBus.trigger("select", data.obj, data.dataset);
|
||||
this.close();
|
||||
return true;
|
||||
}
|
||||
@@ -1262,29 +1406,34 @@
|
||||
query = this.input.getQuery();
|
||||
data = this.menu.getSelectableData($selectable);
|
||||
isValid = data && query !== data.val;
|
||||
if (isValid && !this.eventBus.before("autocomplete", data.obj)) {
|
||||
if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) {
|
||||
this.input.setQuery(data.val);
|
||||
this.eventBus.trigger("autocomplete", data.obj);
|
||||
this.eventBus.trigger("autocomplete", data.obj, data.dataset);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
moveCursor: function moveCursor(delta) {
|
||||
var query, $candidate, data, payload, cancelMove;
|
||||
var query, $candidate, data, suggestion, datasetName, cancelMove, id;
|
||||
query = this.input.getQuery();
|
||||
$candidate = this.menu.selectableRelativeToCursor(delta);
|
||||
data = this.menu.getSelectableData($candidate);
|
||||
payload = data ? data.obj : null;
|
||||
suggestion = data ? data.obj : null;
|
||||
datasetName = data ? data.dataset : null;
|
||||
id = $candidate ? $candidate.attr("id") : null;
|
||||
this.input.trigger("cursorchange", id);
|
||||
cancelMove = this._minLengthMet() && this.menu.update(query);
|
||||
if (!cancelMove && !this.eventBus.before("cursorchange", payload)) {
|
||||
if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) {
|
||||
this.menu.setCursor($candidate);
|
||||
if (data) {
|
||||
this.input.setInputValue(data.val);
|
||||
if (typeof data.val === "string") {
|
||||
this.input.setInputValue(data.val);
|
||||
}
|
||||
} else {
|
||||
this.input.resetInputValue();
|
||||
this._updateHint();
|
||||
}
|
||||
this.eventBus.trigger("cursorchange", payload);
|
||||
this.eventBus.trigger("cursorchange", suggestion, datasetName);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -1322,7 +1471,7 @@
|
||||
www = WWW(o.classNames);
|
||||
return this.each(attach);
|
||||
function attach() {
|
||||
var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, typeahead, MenuConstructor;
|
||||
var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor;
|
||||
_.each(datasets, function(d) {
|
||||
d.highlight = !!o.highlight;
|
||||
});
|
||||
@@ -1347,17 +1496,23 @@
|
||||
});
|
||||
input = new Input({
|
||||
hint: $hint,
|
||||
input: $input
|
||||
input: $input,
|
||||
menu: $menu
|
||||
}, www);
|
||||
menu = new MenuConstructor({
|
||||
node: $menu,
|
||||
datasets: datasets
|
||||
}, www);
|
||||
status = new Status({
|
||||
$input: $input,
|
||||
menu: menu
|
||||
});
|
||||
typeahead = new Typeahead({
|
||||
input: input,
|
||||
menu: menu,
|
||||
eventBus: eventBus,
|
||||
minLength: o.minLength
|
||||
minLength: o.minLength,
|
||||
autoselect: o.autoselect
|
||||
}, www);
|
||||
$input.data(keys.www, www);
|
||||
$input.data(keys.typeahead, typeahead);
|
||||
@@ -1450,7 +1605,7 @@
|
||||
return query;
|
||||
} else {
|
||||
ttEach(this, function(t) {
|
||||
t.setVal(newVal);
|
||||
t.setVal(_.toStr(newVal));
|
||||
});
|
||||
return this;
|
||||
}
|
||||
@@ -1481,8 +1636,10 @@
|
||||
});
|
||||
}
|
||||
function buildHintFromInput($input, www) {
|
||||
return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop("readonly", true).removeAttr("id name placeholder required").attr({
|
||||
autocomplete: "off",
|
||||
return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({
|
||||
readonly: true,
|
||||
required: false
|
||||
}).removeAttr("id name placeholder").removeClass("required").attr({
|
||||
spellcheck: "false",
|
||||
tabindex: -1
|
||||
});
|
||||
@@ -1495,7 +1652,6 @@
|
||||
style: $input.attr("style")
|
||||
});
|
||||
$input.addClass(www.classes.input).attr({
|
||||
autocomplete: "off",
|
||||
spellcheck: false
|
||||
});
|
||||
try {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -2,5 +2,5 @@
|
||||
"warnings": [
|
||||
|
||||
],
|
||||
"source_directory": "/Users/quanvo/IBM/Swift-SMTP"
|
||||
"source_directory": "/Users/dannys/projects/kitura/Swift-SMTP"
|
||||
}
|
||||
+2
-2
@@ -23,7 +23,7 @@
|
||||
|
||||
# 4.0.0 Migration Guide
|
||||
|
||||
- `User` struct now nested in `Mail` struct to avoid namespace issues [(69)](https://github.com/IBM-Swift/Swift-SMTP/pull/69). Create a user like so:
|
||||
- `User` struct now nested in `Mail` struct to avoid namespace issues [(69)](https://github.com/Kitura/Swift-SMTP/pull/69). Create a user like so:
|
||||
|
||||
```swift
|
||||
let sender = Mail.User(name: "Sloth", email: "sloth@gmail.com")
|
||||
@@ -42,7 +42,7 @@ let smtp = SMTP(
|
||||
)
|
||||
```
|
||||
|
||||
- Fixed a bug where the wrong `Attachment` was used an an alternative to text content when a `Mail` was initialized with multiple `Attachment`s [(67)](https://github.com/IBM-Swift/Swift-SMTP/pull/67)
|
||||
- Fixed a bug where the wrong `Attachment` was used an an alternative to text content when a `Mail` was initialized with multiple `Attachment`s [(67)](https://github.com/Kitura/Swift-SMTP/pull/67)
|
||||
|
||||
# 3.0.0 Migration Guide
|
||||
|
||||
|
||||
Reference in New Issue
Block a user