我需要在我的应用中通过ID在Outlook中打开现有邮件。这是否可以在osx上使用?
当前代码:
NSString* mailID = ...
...
NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
NSURL *url = [NSURL fileURLWithPath:[workspace fullPathForApplication:@"Microsoft Outlook.app"]];
NSError *error = nil;
NSArray *arguments = [NSArray arrayWithObjects:@"", @"", nil];
[workspace launchApplicationAtURL:url options:0 configuration:[NSDictionary dictionaryWithObject:arguments forKey:NSWorkspaceLaunchConfigurationArguments] error:&error];
if (error) {
NSLog(@"%@", error.description);
}