kjf Posted May 8, 2013 Share Posted May 8, 2013 The mailmate emails client (http://freron.com) is gaining a lot of traction recently. I use it as my primary email client and would love to see support added in Alfred. manavortex 1 Link to comment Share on other sites More sharing options...
vitor Posted May 8, 2013 Share Posted May 8, 2013 Alfred uses your default email client. Just set it, and it should work. Link to comment Share on other sites More sharing options...
jdfwarrior Posted May 9, 2013 Share Posted May 9, 2013 Alfred uses your default email client. Just set it, and it should work. I think he's referring to using attachments and all. That only works with specific applications. Link to comment Share on other sites More sharing options...
jafish Posted May 9, 2013 Share Posted May 9, 2013 I have MailMate set as my default client, but navigating to a file in Alfred, then selecting "Email To" opens up Mail.app. I assume that's because Alfred relies on Applescript and MailMate's Applescript support is weak? Link to comment Share on other sites More sharing options...
jdfwarrior Posted May 9, 2013 Share Posted May 9, 2013 I have MailMate set as my default client, but navigating to a file in Alfred, then selecting "Email To" opens up Mail.app. I assume that's because Alfred relies on Applescript and MailMate's Applescript support is weak? Actually MailMate has pretty nice AppleScript support. I looked into it the other morning when kjf originally posted this. Alfred just doesn't support it yet because, well.. we didn't know about it, or at least I didn't. I had never heard of it until this post. Link to comment Share on other sites More sharing options...
jafish Posted May 12, 2013 Share Posted May 12, 2013 Actually MailMate has pretty nice AppleScript support. I looked into it the other morning when kjf originally posted this. Alfred just doesn't support it yet because, well.. we didn't know about it, or at least I didn't. I had never heard of it until this post. I'd love to know how you found the applescript support - when I looked at the dictionary it only had one custom command. It might be because I'm not super-familiar with Applescript, but I can't even figure out how you would grab a list of selected messages and do something with them. Link to comment Share on other sites More sharing options...
jdfwarrior Posted May 12, 2013 Share Posted May 12, 2013 I'd love to know how you found the applescript support - when I looked at the dictionary it only had one custom command. It might be because I'm not super-familiar with Applescript, but I can't even figure out how you would grab a list of selected messages and do something with them. Well, actually what I meant was that the AppleScript command to send a new email was extremely easy to use. There was only one command but it would easily allow for creating new mail messages, attaching files, etc. I ended up removing it so I can't quickly look back now, but I don't remember if there was a mechanism for being able to search through messages via AppleScript or not. I would think not. Something like searching the apps messages could potentially be done by reading an SQLite database or something though. Link to comment Share on other sites More sharing options...
bcometa Posted July 4, 2013 Share Posted July 4, 2013 Another MailMate user (it's GREAT btw) hoping for Alfred support for sending attachments. Thanks! Link to comment Share on other sites More sharing options...
minchik Posted July 29, 2013 Share Posted July 29, 2013 Could you add airmail support? Thx! Link to comment Share on other sites More sharing options...
vitor Posted July 29, 2013 Share Posted July 29, 2013 Could you add airmail support? Thx! This is unrelated to the topic; please open a new thread if you want to discuss it. David also commented on this in another thread. Link to comment Share on other sites More sharing options...
Andrew Posted August 6, 2013 Share Posted August 6, 2013 Just to update this thread, I'm adding the ability to add custom AppleScript for open ended email support in the next release of Alfred. This means that users will be able to add support for additional mail clients which Alfred doesn't support by default Tyler Eich 1 Link to comment Share on other sites More sharing options...
nitingoyal Posted August 23, 2013 Share Posted August 23, 2013 Just to update this thread, I'm adding the ability to add custom AppleScript for open ended email support in the next release of Alfred. This means that users will be able to add support for additional mail clients which Alfred doesn't support by default Is it possible to do so in the current version? How do I set MailMate as default client for sending files/attachements from Alfred? Link to comment Share on other sites More sharing options...
Andrew Posted August 23, 2013 Share Posted August 23, 2013 Is it possible to do so in the current version? How do I set MailMate as default client for sending files/attachements from Alfred? It is possible - You'll need to craft the specific AppleScript support for MailMate as all mail clients are different. To get started, create a file called MailMate.applescript (or matching the name of your default Mail client) in the following folder in your home folder: ~/Library/Application Support/Alfred 2/Plugins/Email/ There should be a single AppleScript method in here which Alfred calls with the following format: -- Send an email with an attachment on send_email_with_attachment(ename, eemail, esubject, ebody, eattachment) end send_email_with_attachment To help, here is the full AppleScript used for Mail.app: -- Copyright 2012 RunningWithCrayons. All rights reserved. -- Send an email with an attachment on send_email_with_attachment(ename, eemail, esubject, ebody, eattachment) tell application "Mail" activate set theMessage to make new outgoing message with properties {visible:true, subject:esubject, content:ebody} tell theMessage make new to recipient at end of to recipients with properties {name:ename, address:eemail} end tell tell theMessage repeat with aattachment in eattachment set filefn to (POSIX file aattachment) as Unicode text tell content make new attachment with properties {file name:filefn as alias} at after last paragraph end tell end repeat end tell end tell end send_email_with_attachment It's worth remembering that eattachment is a list of attachments, not a single attachment, even if there is only one attachment. Cheers, Andrew Link to comment Share on other sites More sharing options...
nitingoyal Posted August 23, 2013 Share Posted August 23, 2013 It is possible - You'll need to craft the specific AppleScript support for MailMate as all mail clients are different. Benny from MailMate made the script for me. Works as expected. Path of the file should be "~/Library/Application Support/Alfred 2/Plugins/Email/MailMate.applescript" Here is the script: -- Send an email with an attachment on url_encode(theText) return do shell script "printf " & quoted form of theText & " | xxd -u -plain | sed 's/\\(..\\)/%\\1/g' | tr -d '\\n'" end url_encode on create_mailto(_subject, _body, _attachments, _email, _name) set _to to _email if (_name is not "") then set _to to _name & " <" & _email & ">" end if set _mailto to "mailto:?to=" & url_encode(_to) & "&subject=" & url_encode(_subject) & "&body=" & url_encode(_body) repeat with _attachment in _attachments set _filePath to POSIX path of _attachment set _mailto to _mailto & "&attachment-url=file://" & url_encode(_filePath) end repeat return _mailto end create_mailto on send_email_with_attachment(ename, eemail, esubject, ebody, eattachment) set _mailto to create_mailto(esubject, ebody, eattachment, eemail, ename) tell application "MailMate" open location _mailto with trust activate end tell end send_email_with_attachment or you can download the file from here. Andrew 1 Link to comment Share on other sites More sharing options...
Andrew Posted August 23, 2013 Share Posted August 23, 2013 Fantastic, thanks for organising this! Link to comment Share on other sites More sharing options...
nitingoyal Posted August 23, 2013 Share Posted August 23, 2013 Fantastic, thanks for organising this! Not an issue. Andrew, if there could be an option of selecting the email client to be used in Alfred preference, that would make it easier. Link to comment Share on other sites More sharing options...
Andrew Posted August 23, 2013 Share Posted August 23, 2013 Not an issue. Andrew, if there could be an option of selecting the email client to be used in Alfred preference, that would make it easier. This will likely happen in the future. At this point, I wanted to leave it as an advanced configuration as it's the first type of 'plugin' Alfred has had. Link to comment Share on other sites More sharing options...
mattbowlby Posted December 1, 2013 Share Posted December 1, 2013 Ok, I've got the AppleScript and have put it in the proper folder. But I'm unsure how to use this? What does it allow me to do? Create a workflow that executes that script? Link to comment Share on other sites More sharing options...
robert_muench Posted June 12, 2019 Share Posted June 12, 2019 1. Can I configure Alfred 4 to work with MailMate or do I still need this script? 2. After putting the script into ...Plugins/Email/ how do I tell Alfred to use it? Link to comment Share on other sites More sharing options...
Vero Posted June 12, 2019 Share Posted June 12, 2019 @robert_muench MailMate is supported by default so there's no need for any scripts So long as you set MailMate to be your default mail client, the "email" keyword in Alfred will also use it. Cheers, Vero Link to comment Share on other sites More sharing options...
robert_muench Posted June 12, 2019 Share Posted June 12, 2019 The thing is not the email keyword but the File Actions "Email" and "Email to..." which don't recognize MailMate. Hence, my question regarding the script. Link to comment Share on other sites More sharing options...
deanishe Posted June 12, 2019 Share Posted June 12, 2019 I believe you just need to put the AppleScript in the right directory and Alfred will automatically use MailMate. Can't remember for certain, as I set it up years ago. Link to comment Share on other sites More sharing options...
robert_muench Posted June 12, 2019 Share Posted June 12, 2019 That's what I did, restarted Alfred, but mail.app is still fired up. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now