Create new mail in default app

At one point I requested help for this and was given a very basic mailto script but I can’t find it and I accidentally deleted the action in KBM.

This script would work regardless of the mail app I have as the default. Could anyone provide that? Thanks!

Hey Brandon,

The KM send-mail action currently has problems on El Capitan, although directly scripting Mail works fine.

Run via Execute an AppleScript action.

-Chris

-------------------------------------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2013/05/15 06:11
# dMod: 2015/10/23 20:30
# Appl: Apple Mail
# Task: Make a new outgoing message.
# Libs: None
# Osax: None
# Tags: @Applescript, @Mail, @Make, @New, @Outgoing, @Message
-------------------------------------------------------------------------------------------

set toName to "John Smith"
set toAddress to "address@null.com"
set _sender to "Christopher Stone <null@null.com>" -- MUST match one of your addresses.
set _subject to "Test Message"
set _body to "Now is the time for all good men to come to the aid of their country."
set _sig to "Take_Care"

tell application "Mail"
  set _sig to signature _sig
  set _msg to make new outgoing message with properties {subject:_subject, content:_body & return & return}
  
  tell _msg
    set visible to true
    make new to recipient at end of to recipients with properties {name:toName, address:toAddress}
    set sender to _sender
    set message signature to _sig
  end tell
  
  activate
end tell

------------------------------------------------------------------------------------------

Ok so I need to specific the app that I want to use now? What if I want to use Postbox and its to just open a blank email?

Then you're out of luck.

Postbox is just barely scriptable.

It has a send-message command that works, but you cannot affect an already open message.

-Chris

Ok, will have to make due with another work around then.

Could you use the Open a URL action, with a mailto: URL? That works for me (in Yosemite, anyway; maybe there's a problem in El Capitan?), and opens my default e-mail client.

So you'd do something like:

This works! Thanks!