Sending single attachment to default e-mail client using mailto: in OSX desktop app
Asked Answered
D

0

6

I am developing a desktop application which deals with images. I want to provide a feature that e-mails selected image (single image) to the default e-mail client. So, I am using mailto: as follows:

NSString *eMail = [NSString stringWithFormat: @"mailto:?subject=Test&body=Image];
[[NSWorkspace sharedWorkspace] openURL: [NSURL URLWithString: eMail]];      

How do I send the image as an attachment using mailto:?

I tried the following: But, it does not work.

NSString *eMail = [NSString stringWithFormat: @"mailto:?subject=Test&body=Image&attachment=%@", @"Test.png"];
[[NSWorkspace sharedWorkspace] openURL: [NSURL URLWithString: eMail]];      

What can I try next?

Dasilva answered 21/3, 2011 at 9:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.