문제

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