Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

emate issue with attachments

#1622

Reported by Des Dougan · December 29th, 2016 @ 09:35 PM

State: new
Milestone: none
Assigned to: benny benny

Activity

  1. Des Dougan
    Des Dougan

    emate is not handling attachments via variable where the attachment has spaces in the filename (even when setting the variable escapes the spaces). It used to do so, so it appears something has regressed.

    December 29th, 2016 @ 09:37 PM

  2. benny
    benny

    I could not reproduce this. Could you provide an example to help me out? I'm a bit confused by the “via variable” comment. Attachments are provided as simple command line arguments.

    December 30th, 2016 @ 08:42 AM

  3. Des Dougan
    Des Dougan

    Benny,

    Apologies for not being clear. I use Hazel on my Mac; one of my rules takes a downloaded PDF and as part of the processing, emails it to my wife, using an inbuilt variable for the attachment name.

    At some point recently, it stopped sending the attachments. What I did to debug it was to do it manually using the -v option. Doing so I found, when the attachment name is stored as a variable, it behaves as I found (I have hidden my Gmail address):

    From the command line:


    Des-MacBook:Downloads Des$ /usr/local/bin/emate mailto -v -t xxxxxxxx@gmail.com -s "Test" --send-now web\ protection2.pdf
    Telling MailMate to open: mailto:?to=xxxxxxxx%40gmail.com&subject=Test&attachment-url=file:///Users/Des/Downloads/web%20protection2.pdf&send-now=yes

    Storing the filename as a variable:


    Des-MacBook:Downloads Des$ att=web\ protection2.pdf
    Des-MacBook:Downloads Des$ echo $att
    web protection2.pdf
    Des-MacBook:Downloads Des$ /usr/local/bin/emate mailto -v -t xxxxxxxx@gmail.com -s "Test" --send-now $att
    Telling MailMate to open: mailto:?to=xxxxxxxx%40gmail.com&subject=Test&attachment-url=file:///Users/Des/Downloads/web&attachment-url=file:///Users/Des/Downloads/protection2.pdf&send-now=yes

    I hope this clarifies the issue for you.

    Thanks,

    Des

    December 30th, 2016 @ 03:03 PM

  4. Des Dougan
    Des Dougan

    Benny,

    Were you able to reproduce this behaviour?

    Thanks,

    Des

    January 7th, 2017 @ 07:18 PM

  5. benny
    benny
    • State changed from new to resolved

    Sorry about the late reply. As far as I can see, it's expected behavior. MailMate (emate) doesn't know anything about the $att variable. It's expanded by bash and becomes two command line values instead of one. But you just need to use "$att" instead to make it work.

    I'm not really sure why this ever worked though...

    January 8th, 2017 @ 01:14 PM

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.