Im wondering if there is a way to compose an email in Swift and have it populate fields such as CC and BCC.
Currently I am using NSSharingService and it only appears to have the options for Recipient, Subject, and Body.
I'm not married to using NSSharingService, but I would like to know a way to implement what I am trying to do.
EDIT: I am developing for Mac and not iOS
class SendEmail: NSObject {
static func send(recipient: String) {
let service = NSSharingService(named:
service.recipients = ["Recipient Goes Here"]
service.subject = "Subject Goes Here"
service.perform(withItems: ["Body Goes Here"])
}
}
This works in Swift5 (Xcode 10.2.1, macOS 10.14.5)