質問

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
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top