Skip to content

Commit bec320b

Browse files
authored
Merge pull request #1 from PassiveLogic/feat/email-codable
Make Email, EmailAddress, and Attachment Codable
2 parents e3a9a22 + d083247 commit bec320b

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ You need to add library to `Package.swift` file:
3131

3232
- add package to dependencies:
3333
```swift
34-
.package(url: "https://github.com/Mikroservices/Smtp.git", from: "3.0.0")
34+
.package(url: "https://github.com/PassiveLogic/Smtp.git", from: "3.0.0")
3535
```
3636

3737
- and add product to your target:
@@ -132,7 +132,7 @@ request.smtp.send(email) { message in
132132
After cloning the repository you can open it in Xcode.
133133

134134
```bash
135-
$ git clone https://github.com/Mikroservices/Smtp.git
135+
$ git clone https://github.com/PassiveLogic/Smtp.git
136136
$ cd Smtp
137137
$ open Package.swift
138138
```

Sources/Smtp/Models/Attachment.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import Foundation
88

9-
public struct Attachment {
9+
public struct Attachment: Codable {
1010
public let name: String
1111
public let contentType: String
1212
public let data: Data

Sources/Smtp/Models/Email.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import Foundation
88
import NIO
99

10-
public struct Email {
10+
public struct Email: Codable {
1111
public let from: EmailAddress
1212
public let to: [EmailAddress]?
1313
public let cc: [EmailAddress]?

Sources/Smtp/Models/EmailAddress.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Licensed under the MIT License.
55
//
66

7-
public struct EmailAddress {
7+
public struct EmailAddress: Codable {
88
public let address: String
99
public let name: String?
1010

0 commit comments

Comments
 (0)