Pergunta

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?

Foi útil?

Solução

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
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top