#2134 new
Jeff Y.

Cannot add to environment via mmCommand

Reported by Jeff Y. | October 12th, 2018 @ 04:56 AM

Train.mmCommand runs my command. Almost all changes I make to the file take effect as expected.

I expect:

environment = "MM_X=Y\n";

to result in a the environment variable MM_X being set to Y. However, running MailMate with debug mode on shows:

2018-10-11 21:47:22.429 MailMate[20954:2364760] performBundleItemWithUUIDString: 699BBE17-A6DF-4451-9372-A7CA48CE4468
Triggered command named “Train”
Input type is “canonical”
Environment variables:
 MM_BUNDLE_ITEM_NAME: Train
 MM_BUNDLE_ITEM_UUID: 699BBE17-A6DF-4451-9372-A7CA48CE4468
 MM_BUNDLE_SUPPORT: /Users/jeff/Library/Application Support/MailMate/Bundles/Organize.mmBundle/Support
 MM_ID: 719883
 MM_SUPPORT_PATH: /Applications/MailMate.app/Contents/SharedSupport

I'm running MailMate r5523.

Comments and changes to this ticket

  • benny

    benny November 21st, 2018 @ 11:09 AM

    • State changed from “new” to “cantreproduce”

    MailMate failed to set the environment if not in singleMessage mode (I've fixed this now), but that doesn't seem to explain your issue...

    Can you share the full .mmCommand file with me? Or at least something which reproduces the issue.

  • Jeff Y.

    Jeff Y. November 29th, 2018 @ 09:16 PM

    Here's the full contents of Train.mmCommand:

    {    name = "Train";
        uuid = "699BBE17-A6DF-4451-9372-A7CA48CE4468";
        environment = "MM_X=Y\n";
        input = "canonical"; // Options are: none, raw, decoded, canonical, html, selection, formatted
        // formatString = '"${from.name:?${from.name/"/""/g}:${from.address/"/""/g}}","${from.address/"/""/g}","${subject/"/""/g}","${#mailer.name/"/""/g}",1';
        // formatString = "${from:address}\n${subject}\n${#flags.flag}\n${##tags.tag}\n${#unquoted}\n${#quoted}\n";
        output = "discard"; // Options are: discard, actions
        executionMode = "multipleMessages"; // Options are: noMessages, singleMessage, multipleMessages
        script = '#!/bin/bash\n"${MM_BUNDLE_SUPPORT}/bin/train.py"\n';
        // keyEquivalent = "^o"; // Keyboard shortcut
        // conditions = "list-id exists"; // Can be used to ensure that a command only applies to certain types of messages.
        // Other options are formatString, separatorString, suffixString, filesPattern, saveForEditing, ...
    }
    
  • benny

    benny December 11th, 2018 @ 02:07 PM

    • State changed from “cantreproduce” to “fixcommitted”

    I kind of lost track on this one, but I think it's fixed in the latest test releases: Hold down ⌥ when clicking “Check Now” in the Software Update preferences pane. (At least, I cannot reproduce it.)

  • Jeff Y.

    Jeff Y. December 11th, 2018 @ 09:20 PM

    I confirm it is fixed in the latest release. Thanks! -Jeff

    Debug includes:

    MM_X: Y

  • benny

    benny December 13th, 2018 @ 10:59 AM

    • State changed from “fixcommitted” to “fixreleased”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Mac OS X email client.

Shared Ticket Bins

People watching this ticket

Pages