From b2366ec12f1b61f7822746d63304f5c50b48c5b5 Mon Sep 17 00:00:00 2001 From: meyer-solutions Date: Thu, 2 Mar 2023 12:04:39 +0100 Subject: [PATCH] adding BCC to Mail --- Sources/SwiftSMTP/Mail.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/SwiftSMTP/Mail.swift b/Sources/SwiftSMTP/Mail.swift index 3f34df3..5ecd602 100644 --- a/Sources/SwiftSMTP/Mail.swift +++ b/Sources/SwiftSMTP/Mail.swift @@ -124,6 +124,10 @@ public struct Mail { dictionary["FROM"] = from.mime dictionary["TO"] = to.map { $0.mime }.joined(separator: ", ") + if !bcc.isEmpty { + dictionary["BCC"] = bcc.map { $0.mime }.joined(separator: ", ") + } + if !cc.isEmpty { dictionary["CC"] = cc.map { $0.mime }.joined(separator: ", ") }