We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3dad686 commit 4846bf6Copy full SHA for 4846bf6
Sources/Smtp/Models/Email.swift
@@ -41,11 +41,16 @@ public struct Email {
41
self.cc = cc
42
self.bcc = bcc
43
self.subject = subject
44
- self.body = body
+
45
self.isBodyHtml = isBodyHtml
46
self.replyTo = replyTo
47
self.reference = reference
48
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
54
let date = Date()
55
let dateFormatter = DateFormatter()
56
dateFormatter.locale = Locale(identifier: "en_US")
0 commit comments