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.

Signature is inserted twice

#383

I have one signature configured in MailMate; I have multiple accounts, but I only use a signature with one of them.

Behaviour I'm seeing:

  1. I compose a new message; my signature is in the message body
  2. I enter a recipient
  3. The same signature is inserted again into the message body, directly below the other signature
  4. If I switch to "No Signature" in the signature dropdown, the message body shows one signature again
  5. If I select my signature from the signature dropdown, I go back to having two signatures

Behaviour I'd expect:

  1. I compose a new message; the message body is empty
  2. I enter a recipient
  3. A signature is selected and entered once into the message body
  4. If I switch to "no signature", the message body is empty again
  5. If I switch back to the signature, the signature is inserted once into the message body

Things that might be useful:

  • This behaviour persists even if I select "Reset Usage History" in Preferences -> Signatures
  • I use Markdown formatting for my emails
  • This seems to happen with absolutely all recipients; it's not confined to a subset

Attached is a screenshot of my signature settings, if it helps. My signature text is (with the exception of some phone numbers that I've obscured the final digits of):

--
Rob Miller
Head of Digital

big fish®
11 Chelsea Wharf
15 Lots Road
London
SW10 0QJ
 
Office number: +44 (0)20 xxxx xxxx
Direct number: +44 (0)20 xxxx xxxx

www.bigfish.co.uk

Reported by Rob Miller · April 24th, 2013 @ 10:55 AM

State: fixreleased
Milestone: none
Assigned to: benny benny

Activity

  1. benny
    benny

    Thanks for the detailed description. To make it easier to reproduce the issue then I would like to have the following file:

    ~/Library/Application Support/MailMate/Signatures.plist
    

    You can edit it or send it privately.

    Thanks in advance.

    April 24th, 2013 @ 12:46 PM

  2. benny
    benny
    • State changed from new to reproduced

    April 25th, 2013 @ 01:26 PM

  3. Rob Miller
    Rob Miller

    Hi Benny, sorry for the delay. I've emailed my signature plist file to the email address on that page; not sure if you still need it but just in case.

    April 25th, 2013 @ 01:30 PM

  4. benny
    benny
    • State changed from reproduced to fixcommitted

    The problem is triggered by the line which only contains a single space:

    SW10 0QJ
    [ ]
    Office number: +44 (0)20 xxxx xxxx
    

    You can fix the problem by removing the space, but I have also fixed the code to handle this (stripping it automatically).

    Thanks for reporting this issue.

    April 25th, 2013 @ 03:06 PM

  5. Rob Miller
    Rob Miller

    Removing the space fixes this for me too, thanks.

    Out of interest, from my "curious software developer" perspective, why was it happening? I'm guessing that there's a check for whether the signature is already inserted, and that you're stripping whitespace-only lines at one point already. Then, when you come do do the comparison/substring match to check if the signature is inserted, you're comparing a stripped version to a non-stripped version and so wrongly concluding that the signature hasn't already been inserted. Is that right? It's like a magic trick, ha, I have to know!

    April 25th, 2013 @ 04:03 PM

  6. benny
    benny

    Yes, you are right. I'm stripping extraneous whitespace when creating signatures, but this code failed for lines with only whitespace, because there was no last character before trailing whitespace. (Stripping it is necessary because emails are quite sensitive with regard to trailing whitespace.)

    April 25th, 2013 @ 07:56 PM

  7. benny
    benny
    • State changed from fixcommitted to fixreleased

    July 5th, 2013 @ 11:25 AM

  8. Ingo Lantschner
    Ingo Lantschner

    Seems as if this problem persists. After selecting, adding some recipient, the signature changed from:

    -- 
    Ingo Lantschner
    Marchettigasse 5/10
    A-1060 Wien
    Fon (+43-664) 143 84 18
    E-Mail  ingo@lantschner.name
    GPGMail http://ingo.lantschner.name/public\_key
    

    to:

    -- 
    Ingo Lantschner
    Marchettigasse 5/10
    A-1060 Wien
    Fon (+43-664) 143 84 18
    E-Mail  ingo@lantschner.name
    GPGMail http://ingo.lantschner.name/public\_key
    
    -- 
    Ingo Lantschner
    Marchettigasse 5/10
    A-1060 Wien
    Fon (+43-664) 143 84 18
    E-Mail  ingo@lantschner.name
    GPGMail http://ingo.lantschner.name/public_key
    

    Please note the difference in the url!

    The Signature in the preferences is w/o escaped underscore:

    -- 
    Ingo Lantschner
    Marchettigasse 5/10
    A-1060 Wien
    Fon (+43-664) 143 84 18
    E-Mail  ingo@lantschner.name
    GPGMail http://ingo.lantschner.name/public_key
    

    December 19th, 2013 @ 12:11 PM

  9. benny
    benny
    • State changed from fixreleased to reproduced

    This is not the same problem as the original ticket. This problem is triggered by the _ as you noted. I know why it happens, but I'm not sure how to fix it yet. I'll look into it.

    January 23rd, 2014 @ 08:59 AM

  10. benny
    benny

    @Ingo: Hold down ⌥ when clicking “Check Now” to fetch the latest test release (r3962). I'm not 100% sure the problem is fixed and I would appreciate some feedback.

    January 23rd, 2014 @ 10:50 AM

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.