Skip to content

Commit 4846bf6

Browse files
committed
Fix POSIX new line delimeters
1 parent 3dad686 commit 4846bf6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Sources/Smtp/Models/Email.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,16 @@ public struct Email {
4141
self.cc = cc
4242
self.bcc = bcc
4343
self.subject = subject
44-
self.body = body
44+
4545
self.isBodyHtml = isBodyHtml
4646
self.replyTo = replyTo
4747
self.reference = reference
4848

49+
// Body have to contains POSIX new lines.
50+
self.body = body
51+
.replacingOccurrences(of: "\r\n", with: "\n")
52+
.replacingOccurrences(of: "\n", with: "\r\n")
53+
4954
let date = Date()
5055
let dateFormatter = DateFormatter()
5156
dateFormatter.locale = Locale(identifier: "en_US")

0 commit comments

Comments
 (0)