开发者

Compose a new message in the mail app by a clicking a button

I'm working on a Mac app and I want the user to be able 开发者_运维百科to contact me via email. So I was thinking that there was going to be a button that says contact or something and when the user click on the button it will open the mail app and compose a new message that will be sent to my email address already added.

So kinda like an in app mail function that you can add on the iPhone and iPad apps.

Is this possible?


Using NSWorkspace's -openURL: method you can open a standard mailto: link which can include subject and body and it will launch user's default e-mail app (usually Mail) with pre-populated fields.

mailto:you@domain.com?subject=hello&body=text
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜