Fancy html mail signatures in macOS (OS X) Mail

This post has been updated for macOS 10.12 Sierra.

I wanted to set up a nice html signature for macOS’s Mail app, but the editing options in the Preference > Signatures pane of Mail are painfully limited. Also, even after discovering that I could use cmd-T to change fonts, I found that the fonts that I chose didn’t always display correctly. There was also no way to add <img> tags directly in the Mail app. Obviously, I needed to be able to edit the source HTML directly. Here’s how to do it.

Create a draft signature.

Open Mail. Go to Preferences > Signatures, and create a new signature. Type in some draft text. This creates a file that you can find again through Terminal.

Find your draft signature file through Terminal.

Open Terminal, and type:

$ cd ~/Library/Mail/V4/MailData/Signatures
$ ls *.mailsignature

Edit your signature file in your favorite editor.

I love and use TextWrangler, but you could use vi or any other editor.

If you have multiple signatures, you might need to open each file until you figure out which one to edit.

Consider locking your signature.

I don’t do this, but you might want to. macOS will sometimes change some aspects of your signature to match the font of the rest of your email. This might help you or hurt you, depending on how complicated your signature is. You can lock your signature either through the UI, or in Terminal with this command:

$ chflags uchg *.mailsignature


Your signature should now work.

For including images, it’s better to load the image from a permanent location on the web using <img> tags instead of attaching an image file to each email. This cuts down on the size of each of your emails, sparing your outbox and your recipients’ inboxes. Also, it prevents your email from being flagged in recipients’ inboxes as containing an attachment when in spirit, you don’t have one.

Good luck!

I didn’t come up with all of this on my own. I acknowledge:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s