Re: Open default email client
Re: Open default email client
- Subject: Re: Open default email client
- From: Angela Brett <email@hidden>
- Date: Mon, 26 Aug 2002 20:18:18 +1200
Hi all,
Do you know if there is any easy way to open the default email client to
compose a new message like the following code to open the default internet
browser?
- (void) openDefaultBrowser : (NSString *)url{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[[NSWorkspace sharedWorkspace] openURL: [NSURL URLWithString:url]];
[pool release];
}
It works exactly the same way... url should be a mailto string such
as @"
mailto:email@hidden" You could specify the subject by making
it @"
mailto:email@hidden?subject=Open default email client"
and you can probably specify other fields in the same way although I
haven't tried - it'd be in an RFC somewhere.
--
Angela Brett
email@hidden
http://acronyms.co.nz/angela
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.