Jump to content

[SOLVED] Email a Specific Contact


Recommended Posts

Yes just create a workflow to run the following Applescript (this will send an empty message as written - you can delete the send command to send manually or add code before it to set the content).

 

tell application "Mail"

  set m to make new outgoing message

  tell m

    make new to recipient with properties {name:"someone", address:"someone@somedomain.com"}

    send

  end tell

end tell

Edited by dfay
Link to comment

A simple "mailto:" link should work great.

 

First, make sure Spark is your default email application then:

 

If you simply want to pop Spark mail with the "To:" field already set then you just have to use an Alfred Open URL node set to (where "destination@email.com" is the email to the person you want to email to) :

mailto:?to=destination@email.com

 

If you want to also set the "Subject:" and "Body" field, then use:

mailto:?to=destination@email.com&subject=MySubject&body=MyContent

You can use a {query} or environment variable to set any of those fields if you prefer to do it from Alfred than from Spark and Spark will pop with everything set so you can review before sending.

Link to comment
  • vitor changed the title to [SOLVED] Email a Specific Contact

Just did some more tests and it seems not all email applications use the "to=" parameter (I'm using Airmail and it won't put the email address with the email put with "to="). So to put a reference of a way that works more generally, just remove the "?to=" and move the "?" after the destination email if you want to add the subject and body fields. Like this:

 

mailto:destination@email.com
mailto:destination@email.com?&subject=MySubject&body=MyContent

 

Link to comment
On 3/18/2018 at 10:10 AM, Russell Scott said:

also the above tries to send right away not allowing me to write the message

yes that was explained in the parens above

 

but I agree, mailto: links will be better if you are using 3rd party mail clients

Edited by dfay
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...