Jump to content

MailTo: Select multiple Contacts *and* Groups and compose in your favourite email app


Recommended Posts

22:01:56 background.py:225 INFO     [update-contacts] job already running
22:02:04 background.py:225 INFO     [update-contacts] job already running
22:02:05 background.py:225 INFO     [update-contacts] job already running
22:02:06 background.py:225 INFO     [update-contacts] job already running
22:02:07 background.py:225 INFO     [update-contacts] job already running
22:02:08 background.py:225 INFO     [update-contacts] job already running
22:02:08 update_contacts.py:240 ERROR    exception processing group <ABSmartGroup objective-c instance 0x7f995ba6f100>: NSInvalidUnarchiveOperationException - value for key 'ABSearchValue' was of unexpected class 'NSDate'. Allowed classes are '{(
    NSString
)}'.
22:02:08 update_contacts.py:264 INFO     2676 people, 45 groups cached in 11.04 seconds
22:04:06 update.py:312 INFO     retrieving releases: deanishe/alfred-mailto
22:04:07 update.py:353 INFO     11 releases for deanishe/alfred-mailto
22:04:22 background.py:225 INFO     [update-contacts] job already running
22:04:29 update_contacts.py:240 ERROR    exception processing group <ABSmartGroup objective-c instance 0x7fac85beb800>: NSInvalidUnarchiveOperationException - value for key 'ABSearchValue' was of unexpected class 'NSDate'. Allowed classes are '{(
    NSString
)}'.
22:04:29 update_contacts.py:264 INFO     2676 people, 45 groups cached in 10.39 seconds

Link to comment
8 minutes ago, deanishe said:

The problem appears to be related to Smart Groups. On my Macs (El Capitan and Sierra), the API doesn't return them at all. In any case, your Smart Groups won't show up in MailTo.

Tour fonctionne parfaitement maintenant avec la version 2.1.4.

:blink:

Merci beaucoup pour votre aide.

Link to comment

Are you sure? Did you check the log file for errors?

 

The contacts are cached, and it's possible the old version is just using the old cached contacts. The cached contacts are only replaced if the update script succeeds. So MailTo should continue to work, but new contacts or changes won't be noticed.

 

In view of the error in your log file, I wouldn't expect any version older than v2.3 (the one I just uploaded) to correctly read your contacts.

Link to comment
46 minutes ago, deanishe said:

Êtes-vous sûr? Avez-vous vérifié le fichier journal des erreurs?

 

Les contacts sont mises en cache, et il est possible que l'ancienne version est juste en utilisant les anciens contacts mises en cache. Les contacts ne sont mises en cache remplacées si le script de mise à jour réussit. Alors mailto devrait continuer à travailler, mais de nouveaux contacts ou les changements ne seront pas remarqué.

 

Compte tenu de l'erreur dans votre fichier journal, je ne s'attendre à une version antérieure à v2.3 (celui que je viens uploadé) pour lire correctement vos contacts.

Mises à jour réalisée vers 2.3, création d'un contact "test", tout fonctionne, suppression du contact" test" , ça marche nickel.

Merci

Link to comment
  • 2 months later...
On 10/03/2016 at 11:43 PM, deanishe said:

Yup.

Adding cc/bcc and webmail support are next on the list. I'm currently stuck in the middle of a Searchio! rewrite, however.

That has to come first because the rewrite is currently 10% working, and I really, really need that workflow…

 

Any chance you could add cc/bcc functionality? I have another feature request that I guess is easier to implement, sometimes I want to add a group of people to a mail I'm currently composing, it would then be very nice to be able to use MailTo to find a group and copy the names/email-addresses as plain text that can be copied into the composer window. This may be useful for other purposes too, e.g. when compiling maillists in a document etc. 

Link to comment
  • 11 months later...

Hi Deanishe, I've read the help site and messed around a bit. I came to the conclusion that "mailto" doesn't currently pull in outlook contacts, it's only from the native app or a few others like gmail. Can you confirm? 

 

I'm sure there are others who have pretty extensive work email data bases that might not exist in their apple contacts app, so not being able to tap into the outlook contacts makes it pretty difficult to use most of the workflow functionality. I did try syncing outlook and apple contacts, but the tool (syncmate) didn't really capture most of the emails so I'm out of idea.

 

Is this a feature you would look to include in the future?

 

Thank you!

Link to comment
  • 1 year later...

Hi @Deanishe - I love the mailto workflow. I get the option to start a new mail when typing @ but when I enter a letter of an email address I get google search and not my contacts. What can I do?

 

Found it - need to press@ and tab to be able to search for names in contacts. 

Edited by tosbsas
Link to comment
  • 2 weeks later...
  • 1 year later...
27 minutes ago, deanishe said:

 

I can't help you if you can't give me something more concrete to work with than "not working".

 

Many thanks – and apologies, figured I would first check to see if this was only a problem on my side, or being seen by others! 

What would be best? Should I copy in the debugging(?) report?

 

Included below: 
 

[14:21:59.876] MailTo[Hotkey] Processing complete
[14:21:59.878] MailTo[Hotkey] Passing output '' to Script Filter
[14:22:00.477] MailTo[Script Filter] Queuing argument ''
[14:22:00.657] MailTo[Script Filter] Script with argv '' finished
[14:22:00.660] STDERR: MailTo[Script Filter] .
14:22:00 workflow.py:2055 DEBUG    ---------- MailTo (2.3.1) ----------
14:22:00 workflow.py:1462 DEBUG    reading settings from /Users/goldfish/Library/Application Support/Alfred/Workflow Data/net.deanishe.alfred-mailto/settings.json
14:22:00 workflow.py:2339 DEBUG    update check not due
14:22:00 mailto.py:136 DEBUG    args : Namespace(action=u'search', query=u'')
14:22:00 workflow.py:1689 DEBUG    loading cached data: /Users/goldfish/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred-mailto/all_apps.cpickle
14:22:00 workflow.py:1689 DEBUG    loading cached data: /Users/goldfish/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred-mailto/system_default_app.cpickle
14:22:00 mailto.py:154 DEBUG    Searching contacts
14:22:00 workflow.py:1689 DEBUG    loading cached data: /Users/goldfish/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred-mailto/__workflow_update_status.cpickle
14:22:00 workflow.py:2269 DEBUG    update_data: {u'available': False}
14:22:00 workflow.py:1689 DEBUG    loading cached data: /Users/goldfish/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred-mailto/contacts.cpickle
14:22:00 workflow.py:2248 DEBUG    set last run version: 2.3.1
14:22:00 workflow.py:2097 DEBUG    ---------- finished in 0.042s ----------
[14:22:00.662] MailTo[Script Filter] {"items": [{"arg": "compose", "valid": true, "subtitle": "\u21a9 to compose a new email or start typing to add recipients", "icon": {"path": "icons/compose.icns"}, "title": "Compose a new email"}]}
[14:22:03.422] MailTo[Script Filter] Queuing argument 'john'
[14:22:03.589] MailTo[Script Filter] Script with argv 'john' finished
[14:22:03.593] STDERR: MailTo[Script Filter] .
14:22:03 workflow.py:2055 DEBUG    ---------- MailTo (2.3.1) ----------
14:22:03 workflow.py:1462 DEBUG    reading settings from /Users/goldfish/Library/Application Support/Alfred/Workflow Data/net.deanishe.alfred-mailto/settings.json
14:22:03 workflow.py:2339 DEBUG    update check not due
14:22:03 mailto.py:136 DEBUG    args : Namespace(action=u'search', query=u'john')
14:22:03 workflow.py:1689 DEBUG    loading cached data: /Users/goldfish/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred-mailto/all_apps.cpickle
14:22:03 workflow.py:1689 DEBUG    loading cached data: /Users/goldfish/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred-mailto/system_default_app.cpickle
14:22:03 mailto.py:154 DEBUG    Searching contacts
14:22:03 workflow.py:1689 DEBUG    loading cached data: /Users/goldfish/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred-mailto/__workflow_update_status.cpickle
14:22:03 workflow.py:2269 DEBUG    update_data: {u'available': False}
14:22:03 workflow.py:1689 DEBUG    loading cached data: /Users/goldfish/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred-mailto/contacts.cpickle
14:22:03 mailto.py:335 DEBUG    existing : [] emails : [] invalid_emails : [] query : u'john'
14:22:03 workflow.py:1462 DEBUG    reading settings from /Users/goldfish/Library/Application Support/Alfred/Workflow Data/net.deanishe.alfred-mailto/settings.json
14:22:03 mailto.py:211 DEBUG    5 matches for "john"
14:22:03 workflow.py:2248 DEBUG    set last run version: 2.3.1
14:22:03 workflow.py:2097 DEBUG    ---------- finished in 0.050s ----------
[14:22:03.596] MailTo[Script Filter] {"items": [{"subtitle": "johnr@sun.ac.za  //  \u21e5 to add, \u21a9 to add & compose", "uid": "johnr@sun.ac.za", "title": "", "autocomplete": "johnr@sun.ac.za, ", "valid": true, "arg": "compose johnr@sun.ac.za", "icon": {"path": "icons/person.icns"}}, {"subtitle": "888jjm@gmail.com  //  \u21e5 to add, \u21a9 to add & compose", "uid": "888jjm@gmail.com", "title": "John Marshall", "autocomplete": "888jjm@gmail.com, ", "valid": true, "arg": "compose 888jjm@gmail.com", "icon": {"path": "icons/person.icns"}}, {"subtitle": "ebrezia@sun.ac.za  //  \u21e5 to add, \u21a9 to add & compose", "uid": "ebrezia@sun.ac.za", "title": "Johnson, Me", "autocomplete": "ebrezia@sun.ac.za, ", "valid": true, "arg": "compose ebrezia@sun.ac.za", "icon": {"path": "icons/person.icns"}}, {"subtitle": "sillywalks@theministry.net  //  \u21e5 to add, \u21a9 to add & compose", "uid": "sillywalks@theministry.net", "title": "John Cleese", "autocomplete": "sillywalks@theministry.net, ", "valid": true, "arg": "compose sillywalks@theministry.net", "icon": {"path": "icons/person.icns"}}, {"subtitle": "ebrezia@sun.ac.za  //  \u21e5 to add, \u21a9 to add & compose", "uid": "ebrezia@sun.ac.za", "title": "Ebrezia Johnson", "autocomplete": "ebrezia@sun.ac.za, ", "valid": true, "arg": "compose ebrezia@sun.ac.za", "icon": {"path": "icons/person.icns"}}]}
[14:22:05.993] MailTo[Script Filter] Processing complete
[14:22:06.001] MailTo[Script Filter] Passing output 'compose sillywalks@theministry.net' to Run Script
[14:22:06.181] ERROR: MailTo[Run Script] .
14:22:06 workflow.py:2055 DEBUG    ---------- MailTo (2.3.1) ----------
14:22:06 workflow.py:1462 DEBUG    reading settings from /Users/goldfish/Library/Application Support/Alfred/Workflow Data/net.deanishe.alfred-mailto/settings.json
14:22:06 workflow.py:2339 DEBUG    update check not due
14:22:06 mailto.py:136 DEBUG    args : Namespace(action=u'compose', query=u'sillywalks@theministry.net')
14:22:06 mailto.py:372 DEBUG    Composing email ...
14:22:06 mailto.py:377 DEBUG    Composing email to u'sillywalks@theministry.net'
14:22:06 workflow.py:1689 DEBUG    loading cached data: /Users/goldfish/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred-mailto/all_apps.cpickle
14:22:06 workflow.py:1689 DEBUG    loading cached data: /Users/goldfish/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred-mailto/system_default_app.cpickle
14:22:06 workflow.py:1689 DEBUG    loading cached data: /Users/goldfish/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred-mailto/contacts.cpickle
14:22:06 client.py:93 DEBUG    Loading client formatting rules from /Users/goldfish/Box Sync/Alfred Preferences Sync/Alfred.alfredpreferences/workflows/user.workflow.875BA254-D2CE-410E-92DB-1BF1D0880124/client_rules.json ...
14:22:06 client.py:93 DEBUG    Loading client formatting rules from /Users/goldfish/Library/Application Support/Alfred/Workflow Data/net.deanishe.alfred-mailto/client_rules.json ...
14:22:06 client.py:108 DEBUG    Loaded rules {u'inline_to': True, u'no_commas': False, u'spaces': False, u'mime': False, u'names': True} for client u'com.microsoft.Outlook'
14:22:06 client.py:116 DEBUG    Building URL for app 'com.microsoft.Outlook'
14:22:06 client.py:151 DEBUG    [default] (u'John Cleese', u'sillywalks@theministry.net') --> u'John Cleese <sillywalks@theministry.net>'
14:22:06 mailto.py:381 DEBUG    URL : 'mailto:John Cleese <sillywalks@theministry.net>'
14:22:06 mailto.py:387 DEBUG    default_app : {u'path': u'/Applications/Microsoft Outlook.app', u'name': u'Microsoft Outlook', u'bundleid': u'com.microsoft.Outlook'}
14:22:06 common.py:75 DEBUG    Running command : [u'open', u'-b', u'com.microsoft.Outlook', 'mailto:John Cleese <sillywalks@theministry.net>']
The file /Users/goldfish/Box Sync/Alfred Preferences Sync/Alfred.alfredpreferences/workflows/user.workflow.875BA254-D2CE-410E-92DB-1BF1D0880124/mailto:John Cleese <sillywalks@theministry.net> does not exist.
14:22:06 workflow.py:2074 ERROR    Command '[u'open', u'-b', u'com.microsoft.Outlook', 'mailto:John Cleese <sillywalks@theministry.net>']' returned non-zero exit status 1
Traceback (most recent call last):
  File "/Users/goldfish/Box Sync/Alfred Preferences Sync/Alfred.alfredpreferences/workflows/user.workflow.875BA254-D2CE-410E-92DB-1BF1D0880124/workflow/workflow.py", line 2067, in run
    func(self)
  File "mailto.py", line 140, in run
    return getattr(self, method_name)()
  File "mailto.py", line 393, in do_compose
    command_output(cmd)
  File "/Users/goldfish/Box Sync/Alfred Preferences Sync/Alfred.alfredpreferences/workflows/user.workflow.875BA254-D2CE-410E-92DB-1BF1D0880124/common.py", line 76, in command_output
    return wf.decode(subprocess.check_output(cmd)).strip()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '[u'open', u'-b', u'com.microsoft.Outlook', 'mailto:John Cleese <sillywalks@theministry.net>']' returned non-zero exit status 1
14:22:06 workflow.py:2097 DEBUG    ---------- finished in 0.070s ----------
[14:22:06.193] MailTo[Run Script] Processing complete
[14:22:06.194] MailTo[Run Script] Passing output '{"items": [{"valid": false, "subtitle": "Command '[u'open', u'-b', u'com.microsoft.Outlook', 'mailto:John Cleese <sillywalks@theministry.net>']' returned non-zero exit status 1", "icon": {"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"}, "title": "Error in workflow 'MailTo'"}]}' to Post Notification

 

Edited by Cassady
Link to comment

The error message says the workflow is failing to run Microsoft Outlook.

 

Do you still have Outlook?

 

In any case, go into the workflow’s settings (keyword mailto), use “Force Reload” to update the list of email apps on your system, then change the email client to something else. Then change it back to Outlook if you still have it.

Link to comment
14 minutes ago, deanishe said:

The error message says the workflow is failing to run Microsoft Outlook.

 

Do you still have Outlook?

 

In any case, go into the workflow’s settings (keyword mailto), use “Force Reload” to update the list of email apps on your system, then change the email client to something else. Then change it back to Outlook if you still have it.

Many thanks.

 

I do still have Outlook, and am running it as my default application.

Just ran the "Force Reload", which worked as expected. Changed to Mail.app (confirmed via notification) – ran the workflow, and same issue.

Changed back to Outlook, and no difference. 

Link to comment
11 minutes ago, deanishe said:

You've forgotten the closing single quote.

Silly me – it gives back the following: `The file /Users/goldfish/mailto:John Cleese <sillywalks@theministry.net> does not exist.`

 

Just updating MS Outlook currently, figured I would check if that could make a difference.

That said, Mail.app also didn't work, so not sure if something else to blame. 

Edit: MS Outlook now on V 16.51.21071101, and no change.

Edited by Cassady
Link to comment
13 minutes ago, deanishe said:

Huh. Looks like URL handling has changed. Try this:

 

open -b com.microsoft.Outlook 'mailto:John%20Cleese%20%3Csillywalks%40theministry.net%3E'

 

That works! 😀

So, that needs to be changed in the underlying script, correct? 

Link to comment
15 minutes ago, deanishe said:

 

There's a configuration file called client_rules.json in the workflow.

 

Change "names" from true to false on line 78 in the MS Outlook config.

Ok – many thanks – I think I will be able to make that change, but could you clarify where I would find the file in question?

 

Running a search for "client_rules.json" brings up hits in my backups of "old" workflows, but nothing seemingly related to the current workflow?

Could you kindly explain where I would begin to look?

 

EDIT: Apologies, was being silly. Didn't realise I could right click on the workflow, to show in Finder. 

Will tinker with it now, and see if I get it working. 

 

EDIT: Solved. Thanks a bunch! 

 

Edited by Cassady
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...