Adding Multiple Signatures in Gmail

I've been making some transitions, lately, in how I manage all of my emails. Up till now, I've been using my Mail application within Mac OS X. However, with close to 12,000 emails in my inbox, it's getting slower. And I really don't like the search capability of that app. If I search for a particular pattern such as a sending email address, the results come back in a disorganized fashion. I need something that can also sort by date and other criteria.

So... I've decided to forward all of my email accounts to my Gmail account and use the multiple account feature there. This allows me to go to one application, a web-based one, to get all of my emails. And when I respond to an email, Gmail is configured to reply from the account the message was originally sent to. Pretty nifty, huh?

The problem with this is the signature capability. If I send an email from my personal account, I tend to simply sign with my name. Sometimes I sign with my name and my number. But when I sign with my business account, I prefer to have all of my info included with my emails.

Oh yeah, I like to only use my signature when I send a new message. By default, Gmail only allows you to have one signature for all of your accounts. And if you have the feature enabled, it will always include your signature with each message and each reply. That gets pretty ugly fairly quickly.

To get around all of this, I've added a javascript to Firefox. This is made possible via the Greasemonkey plug-in. The plug-in allows people like you and me to extend the capabilities of Firefox to solve specific needs without requiring us to all be Software Engineers. Currently, there are hundreds of available scripts to solve simple problems. For my purposes, a simple Google search brought me to the Gmail Tweaks: Multiple Signatures. Hmm... pretty descriptive. Don't you think?

The problem with using this script is that there is no real place to add your signatures. You actually have to modify the javascript to add them. But there are escape sequences used to add returns where necessary. And if you're new to programming, these can mess you up. Even though I knew what I was looking at, I couldn't quite figure out why things behaved a bit screwy. Changes that appeared reasonable seemed to break the script. After a bit of "tweaking" I got things to display as I like. I'll share with you my simple changes for having two signatures.

JAVASCRIPT:
  1. // To setup, edit the 3 arrays in this script:
  2. //    * email_array,
  3. //    * sig_array,
  4. //    * col_array,
  5.  
  6. // values must match GMail "From:" dropdown options
  7. email_array = [
  8. 'myoung@wildernessvoice.com',
  9. 'myoung@sullego.com',
  10. // If you want more signatures, add them after this one. Use single quotes and end each one with a comma.
  11.  
  12. ];
  13.  
  14. sig_array = [
  15. '-- \\n' +
  16. 'Mike Young\\n\\nP: (970) 555-1212 | F: (970) 555-1213\\nEmail: myoung@wildernessvoice.com\\n',
  17. '--\\n' +
  18. '' +
  19. 'Mike Young\\nCEO, My Company\\n\\nP: (970) 555-1212 | F: (970) 555-1213\\nEmail: myoung@mycompany.com\\n' +
  20. '\\n',
  21. // The "\\n" are the escape sequences I mentioned. They insert a line return.
  22.  
  23. ];
  24.  
  25. col_array = [
  26. '#FFFFFF',
  27. '#FFFFFF', // These color values determine the look of within Gmail. They don't alter the text color. So, leave as is. Add another one if you have another signature.
  28.  
  29. ];

These changes should be pretty simple. And if you have any issues, please contact me. If you would like me to edit your script for you, just give me the necessary info and I'll do it.

When all is working well, you should see the added signatures next to the "Use Identity" label. Simply click on the appropriate signature and it will be inserted into your email. And that's it.

Gmail Screenshot

By the way, if you look at the bottom of the pic, you'll notice I've got my Blogline feeds showing up within Gmail too. If you're like me, you have lots of windows opened up usually. Well, the last thing I want to do is to be flipping back and forth from email to blogging. It's just another little thing I've added via Greasemonkey to make my life a little less chaotic.

  • Trackback are closed
  • Comments (8)
  1. I’m gonna have to stop blogging a while so I can learn the techie side, aren’t I :/? I don’t wanna…

    I’m still hearing white noise;).

  2. Silly! You don’t have to stop blogging. LOL! I totally understand what you mean about white noise. It’s that way with me too. I hack more than I write code. I don’t like to try inventing the wheel when there are perfectly good ones to take advantage of.

    • EE
    • January 25th, 2007

    You’re so smart. ;)

    What I do know is that I LOVE Gmail’s feature of being able to have several accounts feed into one main one and that I can not only read but respond through that one Gmail page but access all my differ email accounts. That rocks.

  3. You’re officially my new computer guru. I’m still cheesing over the new icon.

  4. EE: Google’s got some other new stuff. They’re now offering email for domains too. So rather than forward my wildernessvoice email to my gmail account, I can actually setup my email so that it’s run by gmail w/o forwarding. This is huge as my current hosting provider’s email servers have always plagued me, including when it comes to forwarding. I always have to send via my gmail account as a backup.

    Tink: You’re so funny. I’m glad you like it.

  5. Hi Mike,

    tried following your prescription – actually copied your script and corrected the mail adresses to suit my own… however, nothing shows up…

    I’ve tried pretty much all I can come 2 think of… the one thing that bothers me is taht I dont know if the problem is due to gmail changes since this post was released or whether im doing something wront. Basically, I can see in other related (bloated) Greasemonkey that the dropdown accounts need to be the same… I’ve tried this also (eg one of my mails is mads@something.tlc and its dropdown descriptions is “mads | Evolver.dk ” – so i’ve tried both the entire statement of teh account as well as the email adress on it’s own… none of this works… any ideas???

  6. There are numerous changes and I haven’t used this in quite a while. But I would look at lines 159 and 161 and replace the two occurrences of window.frames[1] to window.frames[0].

    See if that solves the problem for you.

  7. I enjoy your site very much! THANK YOUs