We've expanded our news coverage and improved our search!
for the latest or search for all things across O'Reilly!
Working with Sheets in Cocoa
Extension: Sending email from Address Book
Response to: Extension: Sending email from Address Book
This is a great addition. I figured out how to clean up the string. When the Send Mail button is clicked, I have another sheet open with fields for To: (which is filled in with the email addresses from the selected records), Cc:, Bcc: and Subject:, and buttons for Send and Cancel. The action for the Send button on the sheet invokes this method:
NSMutableString *temp = [NSMutableString
[temp appendString:[emailToField stringValue]];
[temp appendString:[emailCcField stringValue]];
[temp appendString:[emailBccField stringValue]];
[temp appendString:[emailSubjField stringValue]];
url = (NSString *)
(NULL, (CFStringRef)temp, NULL, NULL,
[[NSWorkspace sharedWorkspace] openURL:
Everything gets put in the proper places in a new message window in Mail.app. Cool stuff.