Skip to main content
changed example bundle id
Source Link
fpotter
  • 321
  • 2
  • 4

You can use the system-installed Python interpreter to quickly change the default mail app.

Copy/paste the following command into Terminal, replacing orgcom.fpottermicrosoft.OpenInWebmailOutlook with the application bundle identifier for your mail app. Outlook's bundle identifier is com.microsoft.Outlook.

/usr/bin/python2.7 <<EOF
import LaunchServices;
result = LaunchServices.LSSetDefaultHandlerForURLScheme(
    "mailto",
    "com.microsoft.Outlook")
print("Result: %d (%s)" % (
    result,
    "Success" if result == 0 else "Error"))
EOF

If you're not sure what the bundle identifier is for your mail app, run osascript -e 'id of app "Some App Name"' to find it. For example, osascript -e 'id of app "Mail"' returns com.apple.mail.

You can use the system-installed Python interpreter to quickly change the default mail app.

Copy/paste the following command into Terminal, replacing org.fpotter.OpenInWebmail with the application bundle identifier for your mail app. Outlook's bundle identifier is com.microsoft.Outlook.

/usr/bin/python2.7 <<EOF
import LaunchServices;
result = LaunchServices.LSSetDefaultHandlerForURLScheme(
    "mailto",
    "com.microsoft.Outlook")
print("Result: %d (%s)" % (
    result,
    "Success" if result == 0 else "Error"))
EOF

If you're not sure what the bundle identifier is for your mail app, run osascript -e 'id of app "Some App Name"' to find it. For example, osascript -e 'id of app "Mail"' returns com.apple.mail.

You can use the system-installed Python interpreter to quickly change the default mail app.

Copy/paste the following command into Terminal, replacing com.microsoft.Outlook with the application bundle identifier for your mail app. Outlook's bundle identifier is com.microsoft.Outlook.

/usr/bin/python2.7 <<EOF
import LaunchServices;
result = LaunchServices.LSSetDefaultHandlerForURLScheme(
    "mailto",
    "com.microsoft.Outlook")
print("Result: %d (%s)" % (
    result,
    "Success" if result == 0 else "Error"))
EOF

If you're not sure what the bundle identifier is for your mail app, run osascript -e 'id of app "Some App Name"' to find it. For example, osascript -e 'id of app "Mail"' returns com.apple.mail.

added 42 characters in body
Source Link
fpotter
  • 321
  • 2
  • 4

You can use the system-installed Python interpreter to quickly change the mailto handlerdefault mail app.

Copy/paste the following command into Terminal, replacing org.fpotter.OpenInWebmail with the application bundle identifier for your mail app. Outlook's bundle identifier is com.microsoft.Outlook.

/usr/bin/python2.7 <<EOF
import LaunchServices;
result = LaunchServices.LSSetDefaultHandlerForURLScheme(
    "mailto",
    "org"com.fpottermicrosoft.OpenInWebmail"Outlook")
print("Result: %d (%s)" % (
    result,
    "Success" if result == 0 else "Error"))
EOF

If you're not sure what the bundle identifier is for your mail app, run osascript -e 'id of app "Some App Name"' to find it. For example, osascript -e 'id of app "Mail"' returns com.apple.mail.

You can use the system-installed Python interpreter to quickly change the mailto handler.

Copy/paste the following command into Terminal, replacing org.fpotter.OpenInWebmail with the application bundle identifier for your mail app.

/usr/bin/python2.7 <<EOF
import LaunchServices;
result = LaunchServices.LSSetDefaultHandlerForURLScheme(
    "mailto",
    "org.fpotter.OpenInWebmail")
print("Result: %d (%s)" % (
    result,
    "Success" if result == 0 else "Error"))
EOF

If you're not sure what the bundle identifier is for your mail app, run osascript -e 'id of app "Some App Name"' to find it. For example, osascript -e 'id of app "Mail"' returns com.apple.mail.

You can use the system-installed Python interpreter to quickly change the default mail app.

Copy/paste the following command into Terminal, replacing org.fpotter.OpenInWebmail with the application bundle identifier for your mail app. Outlook's bundle identifier is com.microsoft.Outlook.

/usr/bin/python2.7 <<EOF
import LaunchServices;
result = LaunchServices.LSSetDefaultHandlerForURLScheme(
    "mailto",
    "com.microsoft.Outlook")
print("Result: %d (%s)" % (
    result,
    "Success" if result == 0 else "Error"))
EOF

If you're not sure what the bundle identifier is for your mail app, run osascript -e 'id of app "Some App Name"' to find it. For example, osascript -e 'id of app "Mail"' returns com.apple.mail.

Source Link
fpotter
  • 321
  • 2
  • 4

You can use the system-installed Python interpreter to quickly change the mailto handler.

Copy/paste the following command into Terminal, replacing org.fpotter.OpenInWebmail with the application bundle identifier for your mail app.

/usr/bin/python2.7 <<EOF
import LaunchServices;
result = LaunchServices.LSSetDefaultHandlerForURLScheme(
    "mailto",
    "org.fpotter.OpenInWebmail")
print("Result: %d (%s)" % (
    result,
    "Success" if result == 0 else "Error"))
EOF

If you're not sure what the bundle identifier is for your mail app, run osascript -e 'id of app "Some App Name"' to find it. For example, osascript -e 'id of app "Mail"' returns com.apple.mail.