How can I send a HTML email from Cocoa?

后端 未结 3 1178
粉色の甜心
粉色の甜心 2020-12-10 17:31

I\'m looking for a way to create a HTML formatted email from a OS X Cocoa application.

My preferred workflow would be: The user selects a menu item and the default m

3条回答
  •  有刺的猬
    2020-12-10 18:01

    Dustin Bachrach posted an elegant (but incomplete) solution here

    It needs a bit of apple script, so you would have to create a different script for each mail app you want to support, but it seems like an easy thing to do.

    You would also need to find the users default mail app which can be done by constructing a mailto: url then use LaunchServices LSGetApplicationForURL(): to return the default email client.

提交回复
热议问题