【问题标题】:How to find the default mail client on Mac OS X?如何在 Mac OS X 上找到默认邮件客户端?
【发布时间】:2012-10-19 11:27:49
【问题描述】:

我有一个应用程序,它提供图像作为输出,这些输出将在邮件客户端的新消息中打开[作为附件]。

在 Mac OS X 上,Apple 邮件是默认的邮件客户端。所以我所做的是,编写了一个自动化工作流程,并使用“打开 Finder 项目”操作在 Mail.app 中打开了输出。

这是我的问题:

如果用户已将“Microsoft Entourage”或“ThunderBird”或任何其他邮件客户端配置为他们的默认邮件客户端,那么我的自动化操作无法在他们配置的邮件应用程序中打开输出。

我想在此链接中找到并启动默认邮件应用程序。

How do I get the default mail client using applescript?

谁能帮助我如何将我的输出图像附加到已启动邮件客户端的新邮件消息中?

【问题讨论】:

标签: macos email applescript automator apple-mail


【解决方案1】:

作为记录,linked question 中接受的答案是这样的:

tell application "System Events"
    try
        value of property list item "LSHandlerRoleAll" of (property list item 1 of property list item "LSHandlers" of property list file (path to preferences as text) & "com.apple.LaunchServices.plist" where value of property list items contains "mailto")
    on error
        "com.apple.mail"
    end try
end tell

你也可以使用MMac::InternetConfig:

VERSIONER_PERL_PREFER_32_BIT=1 perl -MMac::InternetConfig -le 'print +(GetICHelper "mailto")[1]'

DefaultApplication:

$ ~/bin/DefaultApplication -url mailto:
/Applications/Mail.app

【讨论】:

  • 我不知道如何将图像附加到默认邮件客户端的新邮件中。您能帮帮我吗?
猜你喜欢
  • 1970-01-01
  • 2011-07-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-04-09
  • 1970-01-01
  • 1970-01-01
  • 2011-04-06
相关资源
最近更新 更多