开发者

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

开发者 https://www.devze.com 2023-02-17 22:04 出处:网络
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:

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 stringWithForm开发者_StackOverflow中文版at: @"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?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号