1

Is there a way to set Outlook as the default mail client on Mac without first opening Mail and going to preferences- for example on the command line? I have an admin access widget so I've been able to do most things required thusfar.

It seems like an anti-pattern to be required to open a program you don't want to use anymore to make something else the default. Thanks!!

EDIT: LaunchServices (which is accessible via python) seemed to be the trick.

More on LaunchServices https://developer.apple.com/documentation/coreservices/launch_services

You only need a few lines of code but strangely it didn't work with Python3

>>> import LaunchServices
>>> result = LaunchServices.LSSetDefaultHandlerForURLScheme("mailto", "com.microsoft.Outlook")

0 Answers0