NSSharingService Assigns CC and BCC Recipients in Default MAC Application by Default Email

I am new to developing applications for Mac OS X, my question is simple, I can configure the recipients and body text in the default mail application through my application, but I cannot install the CC and BCC recipients in the mail application. Is there a way to set CC and BCC via code, I use Swift. My code for recipients of settings and body is here

 service!.recipients = [self.txtTo.stringValue]
 service!.subject = "Subject"

thank

+4
source share
1 answer

URL- mailto - ( URL , ).

.

:

mailto:a@b.com?subject=blah&cc=b@c.com,c@d.com&bcc=d@e.com,e@f.com

URL-,

[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"mailto:a@b.com?subject=blah&cc=b@c.com,c@d.com&bcc=d@e.com,e@f.com"]]
+4

Source: https://habr.com/ru/post/1655614/


All Articles