#301 new
Alexander Kucera

AppleScript crashing MailMate

Reported by Alexander Kucera | November 16th, 2012 @ 10:54 AM

Hi Benny,

I tried to adapt one of the example Applescripts today to make it work with GrandTotal. However, it always crashes MailMate. I am outputting the mailto: line to check it looks alright and it does. I'm not quite sure if it is my fault or if there is a bug in MailMate.

I have attached the Applescript and I would be pleased as punch if you could take a quick look at it.

Comments and changes to this ticket

  • Alexander Kucera

    Alexander Kucera November 16th, 2012 @ 10:58 AM

    For reference, a typical string as I send it to MailMate:


  • benny

    benny November 16th, 2012 @ 11:22 AM

    I'm not an expert in AppleScript, but the problem seems to be encoding related. All text given to the script should be UTF-8 and that does not seem to be the case. Do you know the encoding of the provided text?

    Here is an example of me asking MailMate to create a message with the subject 'æøå' (Danish letters):

    osascript -e 'tell application "MailMate" to open location "mailto:mm-feedback@freron.com?subject=%C3%A6%C3%B8%C3%A5"'

    But MailMate should not crash! Do you have an example that crashes (the above didn't). I'll review the code. (Looking at the crash reports that problem seems to be related to attachments.)

  • benny

    benny November 16th, 2012 @ 07:37 PM

    I've reproduced the crash bug and I'll fix that part of the problem.

  • Alexander Kucera

    Alexander Kucera November 21st, 2012 @ 09:54 AM

    Hi Benny,

    sorry for being slow to respond. Lots on my plate recently. Is the crash related to the attachment or something else? I ask, because I need the attachment to work for this. I am using this script to send my invoices from GrandTotal to MailMate instead of Mail.app. And that obviously requires me to attach said invoice. :)

    I'll try and fix the UTF-8 issue on my end.

  • benny

    benny November 21st, 2012 @ 10:07 AM

    • State changed from “new” to “reproduced”

    I believe it is a general bug related to attachments, so you probably cannot make it work before I fix that bug. But I have a few other issues I have to fix first (this one is driving me mad) :-)

  • Alexander Kucera

    Alexander Kucera November 21st, 2012 @ 10:46 AM

    No worries. I found a workaround that works for now.

    tell application "Finder"
       reveal the_file
    end tell

    Not as elegant as directly attaching a file, but opening its locations and then a quick drag & drop will do for now. :)

    Also, I when I leave off the attachment, my code seems to work fine. No UTF-8 issues even with more complex characters.

  • benny

    benny November 23rd, 2012 @ 03:54 PM

    • State changed from “reproduced” to “fixcommitted”
  • Alexander Kucera

    Alexander Kucera November 23rd, 2012 @ 05:30 PM

    Cheers Benny! I'm looking forward to trying it out.

  • benny

    benny December 13th, 2012 @ 02:22 PM

    • 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