From 9169075a5ef42596f13c1ab93ffd5669275661bc Mon Sep 17 00:00:00 2001 From: Rockford Wei Date: Fri, 1 Sep 2017 11:22:12 -0400 Subject: [PATCH] Improving ISS-523 Thanks @LeAnne --- .gitignore | 2 +- Sources/SMTP.swift | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index cdaa432..d2615a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .DS_Store -/.build +/.build* /Packages /*.xcodeproj /*.pins diff --git a/Sources/SMTP.swift b/Sources/SMTP.swift index 8c7f39c..2e4bff0 100644 --- a/Sources/SMTP.swift +++ b/Sources/SMTP.swift @@ -345,9 +345,11 @@ public class EMail { }//end if // add the uuid of the email to avoid duplicated shipment - let uuid = UUID().string + var uuidBuf = UUID().string.encode(.base64) ?? [] + uuidBuf.append(0) + let uuid = String(cString: uuidBuf) - body += "Message-ID: <\(uuid)\(from.address.emailSuffix)>\r\n" + body += "Message-ID: <\(uuid).\(from.address)>\r\n" // add the email title if subject.isEmpty {