1 Reply
      Latest reply on Sep 8, 2016 8:55 AM by eskimo
      TDS_SAP Level 1 Level 1 (0 points)

        I am using apple scripts to open Mail app & Outlook App with an attachment and prefilled To, Subject & Body.


        But to do the same, i need to know which is the default mail application that is being used by the user.


        Is there a way to detect this using Apple Script or Java?

        • Re: How to detect the default mail application using Apple Script?
          eskimo Apple Staff Apple Staff (13,335 points)

          In Objective-C you can do this by calling -[NSWorkspace URLForApplicationToOpenURL:] to get the default application for a dummy mailto URL.  Not sure how you’d do that from AppleScript but it seems like you should be able to get to this via ASOC.

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"